<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>Pages</title>
		<!-- Vue，axios传参 -->
		<script src="js/axios.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/vue.js" type="text/javascript" charset="utf-8"></script>
		
		<!-- 菜单栏 -->
		<link rel="stylesheet" type="text/css" href="css/nav.css">
		<link rel="stylesheet" type="text/css" href="fonts/iconfont.css">
		<script type="text/javascript" src="js/jquery.min.js"></script>
		<script type="text/javascript" src="js/nav.js"></script>
		
		<!-- 引入样式 -->
		<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
		<!-- 引入组件库 -->
		<script src="https://unpkg.com/element-ui/lib/index.js"></script>
		<script src="//unpkg.com/vue/dist/vue.js"></script>
		<script src="//unpkg.com/element-ui@2.14.1/lib/index.js"></script>
		<script src="js/vue-router.js" type="text/javascript" charset="utf-8"></script>
		
		<!-- 我的主页 -->
		<link rel="stylesheet" type="text/css" href="css/HomePage.css"/>
		
		<!--
			33 ~ 72 左侧导航栏
			75 ~ 89 系统页头
			
			以下是路由：
				103 ~ 237 商品管理
				240 ~ 317 商品细节
				320 ~ 397 商品详情
				
				401 ~ 497 首页轮播图管理
				501 ~ 598 订单管理
				602 ~ 661 地址管理
				665 ~ 741 用户管理
				743 ~ 828 设置管理员
				
				832 ~ 906 商品类型
				908 ~ 989 国家
				991 ~ 1072 价格
				1074 ~ 1155 推荐
				1158 ~ 1239 工具
				1241 ~ 1322 酒
				
			以下是路由表：
				1330 ~ 1492 商品管理
				1494 ~ 1603 商品细节
				1605 ~ 1715 商品详情
				
				1717 ~ 1827 首页轮播图管理
				1829 ~ 1933 订单管理
				1935 ~ 1981 地址管理
				1983 ~ 2059 管理用户信息
				2061 ~ 2274 设置管理员
				
				2279 ~ 2385 商品类型
				2386 ~ 2497 国家
				2498 ~ 2068 价格
				2069 ~ 2179 推荐
				2180 ~ 2830 工具
				2831 ~ 2941 酒	
			
		 -->
		
		
	</head>
	<body>
		<div id="app" >
			<el-container>
				
				<div class="nav">
					<div class="nav-top">
						<div id="mini" style="border-bottom:1px solid rgba(255,255,255,0.1)"><img src="images/mini.png" ></div>
					</div>
					<ul>
						<li class="nav-item">
							<a href="javascript:;" @click="Goods()"><i class="iconfont icon-shangpin"></i><span>商品管理</span><i class="iconfont nav-more"></i></a>
							<ul>
								<li><a href="javascript:;" @click="Pics()"><span>商品细节</span></a></li>
								<li><a href="javascript:;" @click="GoodsDetail()"><span>商品详情</span></a></li>
							</ul>
						</li>
						<li class="nav-item">
							<a href="javascript:;" @click="Swiper()"><i class="iconfont icon-tubiaozhizuomoban"></i><span>轮播图</span><i class="iconfont nav-more"></i></a>
						</li>
						<li class="nav-item">
							<a href="javascript:;"><i class="iconfont icon-leixing"></i><span>商品类型</span><i class="iconfont nav-more"></i></a>
							<ul>
								<li><a href="javascript:;" @click="BigType()"><span>全局类型</span></a></li>
								<li><a href="javascript:;" @click="RecommendType()"><span>推荐</span></a></li>
								<li><a href="javascript:;" @click="WineType()"><span>酒</span></a></li>
								<li><a href="javascript:;" @click="CountryType()"><span>国家</span></a></li>
								<li><a href="javascript:;" @click="PriceType()"><span>价格</span></a></li>
								<li><a href="javascript:;" @click="ToolType()"><span>工具</span></a></li>
							</ul>
						</li>
						<li class="nav-item">
							<a href="javascript:;" @click="Orders()"><i class="iconfont icon-layer"></i><span>订单管理</span><i class="iconfont nav-more"></i></a>
						</li>
						<li class="nav-item">
							<a href="javascript:;" @click="Address()"><i class="iconfont icon-dizhi2"></i><span>地址管理</span><i class="iconfont nav-more"></i></a>
						</li>
						<li class="nav-item">
							<a href="javascript:;" @click="User()"><i class="iconfont icon-kehuqunzurenxianxing"></i><span>用户管理</span><i class="iconfont nav-more"></i></a>
						</li>
						<li class="nav-item">
							<a href="javascript:;" @click="Admin()"><i class="iconfont icon-shezhi"></i><span>设置管理员</span><i class="iconfont nav-more"></i></a>
						</li>
					</ul>
				</div>
				
				
				<div id="title_head">
					<div id="title_head_left">
						杨小姐的甜酒铺
					</div>
					<div id="title_head_right">
						<p>欢迎您的使用，{{adminName}}</p>
						<el-dropdown class="icon">
							<i class="el-icon-setting" style="margin-right: 15px;margin-top: -50px;font-size: 24px;"></i>
							<el-dropdown-menu slot="dropdown">
								<el-dropdown-item @click.native="AdminInfo()">个人信息</el-dropdown-item>
								<el-dropdown-item @click.native="Exit()">退出系统</el-dropdown-item>
							</el-dropdown-menu>
						</el-dropdown>
					</div>
				</div>
				
				<div id="content">
					<el-main>
						<router-view></router-view>
					</el-main>
				</div>
				
			</el-container>
			
		</div>
		
		
		
		<!-- 商品管理 -->
		<template id="goods">
			<div id="">
				<p class="tap">商品信息</p>
				<el-divider></el-divider>
				<table border="0" height="50px" class="tap_input">
					<tr>
						<td>
							<el-input placeholder="请输入商品号" v-model="Search.goodsId">
								<i slot="prefix" class="el-input__icon el-icon-search"></i>
							</el-input>
						</td>
						<td width="20px"></td>
						<td>
							<el-input placeholder="请输入商品名" v-model="Search.goodsName">
								<i slot="prefix" class="el-input__icon el-icon-search"></i>
							</el-input>
						</td>
						<td width="20px"></td>
						<td>
							<el-input placeholder="请输入商品价格" v-model="Search.goodsPrice">
								<i slot="prefix" class="el-input__icon el-icon-search"></i>
							</el-input>
						</td>
						<td width="20px"></td>
						<td>
							<el-input placeholder="请输入商品类型" v-model="Search.typeId">
								<i slot="prefix" class="el-input__icon el-icon-search"></i>
							</el-input>
						</td>
						<td width="60px"></td>
						<td>
							<el-button type="primary" icon="el-icon-search" @click="SearchGoods()">搜索</el-button>
						</td>
						<td width="40px"></td>
						<td>
							<el-button type="primary" icon="el-icon-zoom-in" @click="AddGoods()">添加</el-button>
						</td>
					</tr>
				</table>
				
				<el-table :data="datas" max-height="420">
					<el-table-column prop="goodsId" label="商品编号" width="140" align="center">
					</el-table-column>
					<el-table-column prop="goodsIcon" label="商品图片" width="140" align="center">
						<!--插入图片链接的代码-->
						<template slot-scope="scope">
							<img :src="scope.row.goodsIcon" alt="" style="width: 80px;height: 80px">
						</template>
					</el-table-column>
					<el-table-column prop="goodsName" label="商品名称" width="240" align="center">
					</el-table-column>
					<el-table-column prop="goodsPrice" label="商品价格" align="center">
					</el-table-column>
					<el-table-column prop="repertory" label="商品库存" align="center">
					</el-table-column>
					<el-table-column prop="goodsType.typeName" label="商品类型" width="90" align="center">
					</el-table-column>
					<el-table-column prop="createTime" label="创建时间" width="200" align="center">
					</el-table-column>
					<el-table-column prop="updateTime" label="修改时间" width="200" align="center">
					</el-table-column>
					<el-table-column label="操作" fixed="right" width="140" align="center">
						<template slot-scope="scope">
							<el-button type="primary" @click="UpGoods(scope.row)" icon="el-icon-edit" circle></el-button>
							<el-button type="danger" @click="DelGoods(scope.row.goodsId)" icon="el-icon-delete" circle></el-button>
						</template>
					</el-table-column>
				</el-table>
				<el-pagination style="margin-top: 20px; text-align: right;" background :current-page.sync="listPage" @current-change="handleCurrentChange" layout="prev, pager, next"
				 :total="total" :page-size="pagesize" v-if="flag">
				</el-pagination>
				
				<!-- 添加界面 -->
				<el-dialog title="添加商品信息" :visible.sync="AddGoodsFormShow">
					<el-form :model="AddGoodsForm" :rules="rules" ref="AddGoodsFormRef">
						<el-form-item label="商品编号" :label-width="formLabelWidth" prop="goodsId">
							<el-input v-model.number="AddGoodsForm.goodsId" autocomplete="off"></el-input>
						</el-form-item>
						<el-form-item label="商品名称" :label-width="formLabelWidth" prop="goodsName">
							<el-input v-model="AddGoodsForm.goodsName" autocomplete="off"></el-input>
						</el-form-item>
						<el-form-item label="售价" :label-width="formLabelWidth" prop="goodsPrice">
							<el-input type="goodsPrice" v-model.number="AddGoodsForm.goodsPrice" autocomplete="off">
								<template slot="append">元</template>
							</el-input>
						</el-form-item>
						<el-form-item label="库存" :label-width="formLabelWidth" prop="repertory">
							<el-input v-model="AddGoodsForm.repertory" autocomplete="off" type="number"></el-input>
						</el-form-item>
						<el-form-item label="商品图片链接" :label-width="formLabelWidth" prop="goodsIcon">
							<el-input v-model="AddGoodsForm.goodsIcon" autocomplete="off"></el-input>
						</el-form-item>
						<el-form-item label="类型ID" :label-width="formLabelWidth" prop="typeId">
							<el-input v-model.number="AddGoodsForm.typeId" autocomplete="off"></el-input>
						</el-form-item>
					</el-form>
					<div slot="footer" class="dialog-footer">
						<el-button @click="AddGoodsCancel()">取 消</el-button>
						<el-button type="primary" @click="AddGoodsSure('AddGoodsFormRef')">确 定</el-button>
					</div>
				</el-dialog>
				
				<!-- 修改界面 -->
				<el-dialog title="修改商品信息" :visible.sync="UpGoodsFormShow">
					<el-form :model="UpGoodsForm">
						<el-form-item label="商品编号" :label-width="formLabelWidth">
							<el-input v-model="UpGoodsForm.goodsId" autocomplete="off" :disabled="true"></el-input>
						</el-form-item>
						<el-form-item label="类型ID" :label-width="formLabelWidth">
							<el-input v-model="UpGoodsForm.typeId" autocomplete="off"></el-input>
						</el-form-item>
						<el-form-item label="商品名称" :label-width="formLabelWidth">
							<el-input v-model="UpGoodsForm.goodsName" autocomplete="off"></el-input>
						</el-form-item>
						<el-form-item label="商品图片链接" :label-width="formLabelWidth">
							<el-input v-model="UpGoodsForm.goodsIcon" autocomplete="off"></el-input>
						</el-form-item>
						<el-form-item label="售价" :label-width="formLabelWidth">
							<el-input v-model="UpGoodsForm.goodsPrice" autocomplete="off"></el-input>
						</el-form-item>
						<el-form-item label="库存" :label-width="formLabelWidth">
							<el-input v-model="UpGoodsForm.repertory" autocomplete="off"></el-input>
						</el-form-item>
						<el-form-item label="创建时间" :label-width="formLabelWidth">
							<el-input v-model="UpGoodsForm.createTime" autocomplete="off" :disabled="true"></el-input>
						</el-form-item>
					</el-form>
					<div slot="footer" class="dialog-footer">
						<el-button @click="UpGoodsFormShow = false">取 消</el-button>
						<el-button type="primary" @click="UpGoodsSure()">确 定</el-button>
					</div>
				</el-dialog>
			</div>
		</template>
		
		
		<!-- 商品细节 -->
		<template id="pics">
			<div id="">
				<p class="tap">商品细节图片</p>
				<el-divider></el-divider>
				<table border="0" height="50px" class="tap_input">
					<tr>
						<td>
							<el-input placeholder="请输入商品号" v-model="Search.goodsId">
								<i slot="prefix" class="el-input__icon el-icon-search"></i>
							</el-input>
						</td>
						<td width="300px"></td>
						<td>
							<el-button type="primary" icon="el-icon-search" @click="SearchPics()">搜索</el-button>
						</td>
						<td width="40px"></td>
						<td>
							<el-button type="primary" icon="el-icon-zoom-in" @click="AddPics()">添加</el-button>
						</td>
					</tr>
				</table>
				
				<el-table :data="datas" max-height="420">
					<el-table-column prop="picsId" label="编号" align="center">
					</el-table-column>
					<el-table-column prop="picsUrl" label="商品图片" align="center">
						<template slot-scope="scope">
							<img :src="scope.row.picsUrl" alt="" style="width: 80px;height: 80px">
						</template>
					</el-table-column>
					<el-table-column prop="goodsId" label="商品号" align="center">
					</el-table-column>
					<el-table-column label="操作" align="center">
				  		<el-button type="primary" @click="UpPics(scope.row)" icon="el-icon-edit" circle></el-button>
						<el-button type="danger" @click="DelPics(scope.row.picsId)" icon="el-icon-delete" circle></el-button>
					</el-table-column>
				</el-table>
				<el-pagination style="margin-top: 20px;text-align: right;" background :current-page.sync="listPage" @current-change="handleCurrentChange" layout="prev, pager, next"
				 :total="total" :page-size="pagesize" v-if="flag">
				</el-pagination>
				
				<!-- 添加界面 -->
				<el-dialog title="添加图片" :visible.sync="AddPicsFormShow">
					<el-form :model="AddPicsForm">
						<el-form-item label="商品图片链接" :label-width="formLabelWidth">
							<el-input v-model="AddPicsForm.picsUrl" autocomplete="off"></el-input>
						</el-form-item>
						<el-form-item label="商品号" :label-width="formLabelWidth">
							<el-input v-model="AddPicsForm.goodsId" autocomplete="off"></el-input>
						</el-form-item>
					</el-form>
					<div slot="footer" class="dialog-footer">
						<el-button @click="AddPicsCancel()">取 消</el-button>
						<el-button type="primary" @click="AddPicsSure()">确 定</el-button>
					</div>
				</el-dialog>
				
				<!-- 修改界面 -->
				<el-dialog title="修改图片" :visible.sync="UpPicsFormShow">
					<el-form :model="UpPicsForm">
						<el-form-item label="编号" :label-width="formLabelWidth">
							<el-input v-model="UpPicsForm.picsId" autocomplete="off" :disabled="true"></el-input>
						</el-form-item>
						<el-form-item label="商品图片链接" :label-width="formLabelWidth">
							<el-input v-model="UpPicsForm.picsUrl" autocomplete="off"></el-input>
						</el-form-item>
						<el-form-item label="商品号" :label-width="formLabelWidth">
							<el-input v-model="UpPicsForm.goodsId" autocomplete="off"></el-input>
						</el-form-item>
					</el-form>
					<div slot="footer" class="dialog-footer">
						<el-button @click="UpPicsFormShow = false">取 消</el-button>
						<el-button type="primary" @click="UpPicsSure()">确 定</el-button>
					</div>
				</el-dialog>
			</div>		
		</template>
		
		
		<!-- 商品详情 -->
		<template id="goodsdetail">
			<div id="">
				<p class="tap">商品详情描述</p>
				<el-divider></el-divider>
				<table border="0" height="50px" class="tap_input">
					<tr>
						<td>
							<el-input placeholder="请输入商品号" v-model="Search.goodsId">
								<i slot="prefix" class="el-input__icon el-icon-search"></i>
							</el-input>
						</td>
						<td width="300px"></td>
						<td>
							<el-button type="primary" icon="el-icon-search" @click="SearchGoodsDetail()">搜索</el-button>
						</td>
						<td width="40px"></td>
						<td>
							<el-button type="primary" icon="el-icon-zoom-in" @click="AddGoodsDetail()">添加</el-button>
						</td>
					</tr>
				</table>
								
				<el-table :data="datas" max-height="420">
					<el-table-column prop="goodsdetailId" label="编号" align="center">
					</el-table-column>
					<el-table-column prop="goodsdetailUrl" label="商品详情" align="center">
						<template slot-scope="scope">
							<img :src="scope.row.goodsdetailUrl" alt="" style="width: 80px;height: 120px">
						</template>
					</el-table-column>
					<el-table-column prop="goodsId" label="商品编号" align="center">
					</el-table-column>
					<el-table-column label="操作" align="center">
				  		<el-button type="primary" @click="Up(scope.row)" icon="el-icon-edit" circle></el-button>
						<el-button type="danger" @click="Del(scope.row.goodsdetailId)" icon="el-icon-delete" circle></el-button>
					</el-table-column>
				</el-table>
				<el-pagination style="margin-top: 20px;text-align: right;" background :current-page.sync="listPage" @current-change="handleCurrentChange" layout="prev, pager, next"
				 :total="total" :page-size="pagesize" v-if="flag">
				</el-pagination>
				
				<!-- 添加界面 -->
				<el-dialog title="添加图片" :visible.sync="AddGoodsDetailFormShow">
					<el-form :model="AddGoodsDetailForm">
						<el-form-item label="商品图片链接" :label-width="formLabelWidth">
							<el-input v-model="AddGoodsDetailForm.goodsdetailUrl" autocomplete="off"></el-input>
						</el-form-item>
						<el-form-item label="商品号" :label-width="formLabelWidth">
							<el-input v-model="AddGoodsDetailForm.goodsId" autocomplete="off"></el-input>
						</el-form-item>
					</el-form>
					<div slot="footer" class="dialog-footer">
						<el-button @click="AddGoodsDetailCancel()">取 消</el-button>
						<el-button type="primary" @click="AddGoodsDetailSure()">确 定</el-button>
					</div>
				</el-dialog>
				
				<!-- 修改界面 -->
				<el-dialog title="修改图片" :visible.sync="UpGoodsDetailFormShow">
					<el-form :model="UpGoodsDetailForm">
						<el-form-item label="编号" :label-width="formLabelWidth">
							<el-input v-model="UpGoodsDetailForm.goodsdetailId" autocomplete="off" :disabled="true"></el-input>
						</el-form-item>
						<el-form-item label="商品图片链接" :label-width="formLabelWidth">
							<el-input v-model="UpGoodsDetailForm.goodsdetailUrl" autocomplete="off"></el-input>
						</el-form-item>
						<el-form-item label="商品号" :label-width="formLabelWidth">
							<el-input v-model="UpGoodsDetailForm.goodsId" autocomplete="off"></el-input>
						</el-form-item>
					</el-form>
					<div slot="footer" class="dialog-footer">
						<el-button @click="UpGoodsDetailFormShow = false">取 消</el-button>
						<el-button type="primary" @click="UpGoodsDetailSure()">确 定</el-button>
					</div>
				</el-dialog>
			</div>		
		</template>
		
		
		
		<!-- 首页轮播图管理 -->
		<template id="swiper">
			<div id="">
				<p class="tap">轮播图信息</p>
				<el-divider></el-divider>
				<table border="0" height="50px" class="tap_input">
					<tr>
						<td>
							<el-input placeholder="请输入轮播图ID" v-model="Search.swiperId">
								<i slot="prefix" class="el-input__icon el-icon-search"></i>
							</el-input>
						</td>
						<td width="20px"></td>
						<td>
							<el-input placeholder="请输入商品名" v-model="Search.goodsId">
								<i slot="prefix" class="el-input__icon el-icon-search"></i>
							</el-input>
						</td>
						<td width="20px"></td>
						<td>
							<el-input placeholder="请输入商品类别" v-model="Search.swiperUrl">
								<i slot="prefix" class="el-input__icon el-icon-search"></i>
							</el-input>
						</td>
						<td width="60px"></td>
						<td>
							<el-button type="primary" icon="el-icon-search" @click="SearchSwiper()">搜索</el-button>
						</td>
						<td width="40px"></td>
						<td>
							<el-button type="primary" icon="el-icon-zoom-in" @click="AddSwiper()">添加</el-button>
						</td>
					</tr>
				</table>
				<el-table :data="datas" style="width: 100%"  max-height="420">
					<el-table-column prop="swiperId" label="轮播图编号" align="center">
					</el-table-column>
					<el-table-column prop="swiperUrl" label="轮播图片" align="center">
						<!--插入图片链接的代码-->
						<template slot-scope="scope">
							<img :src="scope.row.swiperUrl" alt="" style="width: 140px;height: 80px">
						</template>
					</el-table-column>
					<el-table-column prop="goods.goodsName" label="商品名称" align="center">
					</el-table-column>
					<el-table-column prop="goods.goodsType.typeName" label="商品类型" align="center">
					</el-table-column>
					<el-table-column label="操作" align="center">
						<template slot-scope="scope">
							<el-button type="primary" @click="UpSwiper(scope.row)" icon="el-icon-edit" circle></el-button>
							<el-button type="danger" @click="DelSwiper(scope.row.swiperId)" icon="el-icon-delete" circle></el-button>
						</template>	
					</el-table-column>
				</el-table>
				<el-pagination style="margin-top: 20px;text-align: right;" background :current-page.sync="listPage" @current-change="handleCurrentChange" layout="prev, pager, next"
				 :total="total" :page-size="pagesize" v-if="flag">
				</el-pagination>
				
				<!-- 添加界面 -->
				<el-dialog title="添加轮播图信息" :visible.sync="AddSwiperFormShow">
					<el-form :model="AddSwiperForm">
						<el-form-item label="轮播图编号" :label-width="formLabelWidth">
							<el-input v-model="AddSwiperForm.swiperId" autocomplete="off"></el-input>
						</el-form-item>
						<el-form-item label="轮播图链接" :label-width="formLabelWidth">
							<el-input v-model="AddSwiperForm.swiperUrl" autocomplete="off"></el-input>
						</el-form-item>
						<el-form-item label="商品编号" :label-width="formLabelWidth">
							<el-input v-model="AddSwiperForm.goodsId" autocomplete="off"></el-input>
						</el-form-item>
					</el-form>
					<div slot="footer" class="dialog-footer">
						<el-button @click="AddSwiperCancel()">取 消</el-button>
						<el-button type="primary" @click="AddSwiperSure()">确 定</el-button>
					</div>
				</el-dialog>
				
				<!-- 修改界面 -->
				<el-dialog title="修改轮播图信息" :visible.sync="UpSwiperFormShow">
					<el-form :model="UpSwiperForm">
						<el-form-item label="轮播图编号" :label-width="formLabelWidth">
							<el-input v-model="UpSwiperForm.swiperId" autocomplete="off" :disabled="true"></el-input>
						</el-form-item>
						<el-form-item label="轮播图链接" :label-width="formLabelWidth">
							<el-input v-model="UpSwiperForm.swiperUrl" autocomplete="off"></el-input>
						</el-form-item>
						<el-form-item label="商品编号" :label-width="formLabelWidth">
							<el-input v-model="UpSwiperForm.goodsId" autocomplete="off"></el-input>
						</el-form-item>
					</el-form>
					<div slot="footer" class="dialog-footer">
						<el-button @click="UpSwiperFormShow = false">取 消</el-button>
						<el-button type="primary" @click="UpSwiperSure()">确 定</el-button>
					</div>
				</el-dialog>
			</div>
		</template>
		
		
		
		<!-- 订单管理 -->
		<template id="orders">
			<div id="">
				<p class="tap">订单信息</p>
				<el-divider></el-divider>
				<table border="0" height="50px" class="tap_input">
					<tr>
						<td>
							<el-input placeholder="请输入订单号" v-model="Search.orderId">
								<i slot="prefix" class="el-input__icon el-icon-search"></i>
							</el-input>
						</td>
						<td width="20px"></td>
						<td>
							<el-input placeholder="请输入收货人" v-model="Search.consignee">
								<i slot="prefix" class="el-input__icon el-icon-search"></i>
							</el-input>
						</td>
						<td width="20px"></td>
						<td>
							<el-input placeholder="请输入地址" v-model="Search.addressId">
								<i slot="prefix" class="el-input__icon el-icon-search"></i>
							</el-input>
						</td>
						<td width="20px"></td>
						<td>
							<el-input placeholder="请输入订单状态" v-model="Search.orderStart">
								<i slot="prefix" class="el-input__icon el-icon-search"></i>
							</el-input>
						</td>
						<td width="120px"></td>
						<td>
							<el-button type="primary" icon="el-icon-search" @click="SearchOrders()">搜索</el-button>
						</td>
					</tr>
				</table>
				
				<el-table :data="datas" style="width: 100%"  max-height="420">
					<el-table-column prop="orderId" label="订单编号" align="center" width="180">
					</el-table-column>
					<el-table-column prop="orderTotalprice" label="订单总价" align="center">
					</el-table-column>
					<el-table-column prop="address" label="收货地址" align="center"  width="180">
						<template slot-scope="scope">
							{{scope.row.address.addressArea}}{{scope.row.address.addressName}}
						</template>
					</el-table-column>
					<el-table-column prop="address.consignee" label="收货人" align="center">
					</el-table-column>
					<el-table-column prop="address.userPhone" label="联系电话" align="center" width="140">
					</el-table-column>
					<el-table-column prop="goodsId" label="商品编号" align="center">
					</el-table-column>
					<el-table-column prop="goodsNumber" label="商品数量" align="center">
					</el-table-column>
					<el-table-column prop="orderStart" label="订单状态" align="center">
					</el-table-column>
					<el-table-column prop="createTime" label="创建时间" align="center" width="180">
					</el-table-column>
					<el-table-column prop="updateTime" label="修改时间" align="center" width="180">
					</el-table-column>
					<el-table-column prop="user.nickname" label="订单所属用户" align="center" width="120">
					</el-table-column>
					<el-table-column label="操作" width="120px" fixed="right" align="center">
						<template slot-scope="scope">
							<el-button type="primary" @click="UpOrders(scope.row)" icon="el-icon-edit" circle></el-button>
							<el-button type="danger" @click="DelOrders(scope.row)" icon="el-icon-delete" circle></el-button>
						</template>
					</el-table-column>
				</el-table>
				<el-pagination style="margin-top: 20px; text-align: right;" background :current-page.sync="listPage" @current-change="handleCurrentChange" layout="prev, pager, next"
				 :total="total" :page-size="pagesize" v-if="flag">
				</el-pagination>
				
				<!-- 修改界面 -->
				<el-dialog title="修改订单信息" style="width: 60%;margin-top: 100px; margin-left: 600px;" :visible.sync="UpOrdersFormShow">
					<el-form :model="UpOrdersForm" style="width: 340px;">
						<el-form-item label="商品编号" :label-width="formLabelWidth">
							<el-input v-model="UpOrdersForm.orderId" autocomplete="off" :disabled="true"></el-input>
						</el-form-item>
						<el-form-item label="订单状态" style="margin-left: 50px;">
							<el-select v-model="UpOrdersForm.orderStart" placeholder="请选择订单状态">
								<el-option label="待发货" value="待发货"></el-option>
								<el-option label="已发货" value="已发货"></el-option>
							</el-select>
						</el-form-item>
						<el-form-item label="创建时间" :label-width="formLabelWidth">
							<el-input v-model="UpOrdersForm.createTime" autocomplete="off" :disabled="true"></el-input>
						</el-form-item>
					</el-form>
					<div slot="footer" class="dialog-footer">
						<el-button @click="UpOrdersFormShow = false">取 消</el-button>
						<el-button type="primary" @click="UpOrdersSure()">确 定</el-button>
					</div>
				</el-dialog>
				
			</div>		
		</template>
		
		
		
		<!-- 地址管理 -->
		<template id="address">
			<div id="">
				<p class="tap">地址信息</p>
				<el-divider></el-divider>
				<table border="0" height="50px" class="tap_input">
					<tr>
						<td>
							<el-input placeholder="请输入地址名称" v-model="Search.addressArea">
								<i slot="prefix" class="el-input__icon el-icon-search"></i>
							</el-input>
						</td>
						<td width="20px"></td>
						<td>
							<el-input placeholder="收货人" v-model="Search.consignee">
								<i slot="prefix" class="el-input__icon el-icon-search"></i>
							</el-input>
						</td>
						<td width="20px"></td>
						<td>
							<el-input placeholder="联系方式" v-model="Search.userPhone">
								<i slot="prefix" class="el-input__icon el-icon-search"></i>
							</el-input>
						</td>
						<td width="180px"></td>
						<td>
							<el-button type="primary" icon="el-icon-search" @click="SearchAddress()">搜索</el-button>
						</td>
					</tr>
				</table>
				
				<el-table :data="datas" style="width: 100%" max-height="420">
					<el-table-column prop="addressId" label="地址编号" align="center">
					</el-table-column>
					<el-table-column prop="addressArea" label="地址区域" align="center">
					</el-table-column>
					<el-table-column prop="addressName" label="详细地址" align="center">
					</el-table-column>
					<el-table-column prop="consignee" label="收货人" align="center">
					</el-table-column>
					<el-table-column prop="userPhone" label="联系电话" align="center">
					</el-table-column>
					<el-table-column prop="createTime" label="创建时间" align="center" width="180">
					</el-table-column>
					<el-table-column prop="updateTime" label="修改时间" align="center" width="180">
					</el-table-column>
					<el-table-column prop="user.nickname" label="创建者" align="center">
					</el-table-column>
					<el-table-column prop="user.avatarurl" label="用户头像" align="center">
						<!--用户头像-->
						<template slot-scope="scope">
							<div class="block"><el-avatar shape="square" :size="80" :src="scope.row.user.avatarurl"></el-avatar></div>
						</template>
					</el-table-column>
				</el-table>
				<el-pagination style="margin-top: 20px;text-align: right;" background :current-page.sync="listPage" @current-change="handleCurrentChange" layout="prev, pager, next"
				 :total="total" :page-size="pagesize" v-if="flag">
				</el-pagination>
			</div>		
		</template>
		
		
		
		<!-- 用户管理 -->
		<template id="user">
			<div id="">
				<p class="tap">用户信息</p>
				<el-divider></el-divider>
				<table border="0" height="50px" class="tap_input">
					<tr>
						<td>
							<el-input placeholder="请输入用户昵称" v-model="Search.nickname">
								<i slot="prefix" class="el-input__icon el-icon-search"></i>
							</el-input>
						</td>
						<td width="20px"></td>
						<td>
							<el-select v-model="Search.gender" placeholder="请选择性别">
								<el-option label="男" value="男"></el-option>
								<el-option label="女" value="女"></el-option>
							</el-select>
						</td>
						<td width="20px"></td>
						<td>
							<el-input placeholder="所在城市" v-model="Search.city">
								<i slot="prefix" class="el-input__icon el-icon-search"></i>
							</el-input>
						</td>
						<td width="20px"></td>
						<td>
							<el-select v-model="userstart" placeholder="请选择登录状态">
								<el-option label="登录" value="登录"></el-option>
								<el-option label="退出" value="退出"></el-option>
							</el-select>
						</td>
						<td width="120px"></td>
						<td>
							<el-button type="primary" icon="el-icon-search" @click="SearchUser()">搜索</el-button>
						</td>
					</tr>
				</table>
				
				<el-table :data="datas" style="width: 100%" max-height="420">
					<el-table-column prop="nickname" label="昵称" align="center">
					</el-table-column>
					<el-table-column prop="avatarurl" label="用户头像" align="center">
						<!--用户头像-->
						<template slot-scope="scope">
							<div class="block"><el-avatar shape="square" :size="80" :src="scope.row.avatarurl"></el-avatar></div>
						</template>
					</el-table-column>
					<el-table-column prop="gender" label="性别" align="center">
					</el-table-column>
					<el-table-column prop="country" label="国家" align="center">
					</el-table-column>
					<el-table-column prop="province" label="省份" align="center">
					</el-table-column>
					<el-table-column prop="city" label="城市" align="center">
					</el-table-column>
					<el-table-column prop="haveuserinfo" label="登录状态" align="center">
						<template slot-scope="scope">
							<p v-if="datas[scope.$index].haveuserinfo==true">登录</p>
							<p v-else>退出</p>
						</template>
					</el-table-column>
					<el-table-column prop="createTime" label="创建时间" align="center" width="180">
					</el-table-column>
					<el-table-column prop="updateTime" label="修改时间" align="center" width="180">
					</el-table-column>
					<el-table-column label="删除" align="center">
						<template slot-scope="scope">
							<el-button type="danger" @click="DelUser(scope.row)" icon="el-icon-delete" circle></el-button>
						</template>
					</el-table-column>
				</el-table>
				<el-pagination style="margin-top: 20px;text-align: right;" background :current-page.sync="listPage" @current-change="handleCurrentChange" layout="prev, pager, next"
					:total="total" :page-size="pagesize" v-if="flag">
				</el-pagination>
			</div>
		</template>
		
		<!-- 设置管理员 -->
		<template id="admin">
			<div id="">
				<p class="tap">管理员信息</p>
				<el-divider></el-divider>
				<el-tabs type="border-card" style="height: 490px; margin-top: -20px;">
					<el-tab-pane label="修改信息">
						<el-form :model="UpAdminForm" style="width: 400px;">
							<el-form-item label="管理员ID" :label-width="formLabelWidth">
								<el-input v-model="UpAdminForm.adminId" autocomplete="off" :disabled="true"></el-input>
							</el-form-item>
							<el-form-item label="管理员昵称" :label-width="formLabelWidth">
								<el-input v-model="UpAdminForm.adminName" autocomplete="off"></el-input>
							</el-form-item>
							<el-form-item label="管理员密码" :label-width="formLabelWidth">
								<el-input type="password" v-model="UpAdminForm.adminPwd" autocomplete="off" :disabled="true"></el-input>
							</el-form-item>
							<el-form-item label="性别" :label-width="formLabelWidth">
								<el-select v-model="UpAdminForm.adminSex" placeholder="请选择性别">
									<el-option label="男" value="男"></el-option>
									<el-option label="女" value="女"></el-option>
								</el-select>
							</el-form-item>
							<el-form-item label="生日" :label-width="formLabelWidth">
								<el-date-picker v-model="UpAdminForm.adminBirthday" type="date" value-format="yyyy-MM-dd" placeholder="选择日期">
								</el-date-picker>
							</el-form-item>
						</el-form>
						<div style="margin-left: 140px;">
							<el-button type="primary" @click="UpAdminSure()">确 定</el-button>
							<el-button @click="UpAdminReset()">重 置</el-button>
						</div>
					</el-tab-pane>
					
					<el-tab-pane label="修改密码">
						<el-form style="width: 400px; margin-top: 40px;" :model="ruleForm" status-icon :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
							<el-form-item label="旧密码" prop="oldpass">
								<el-input v-model="ruleForm.oldpass"></el-input>
							</el-form-item>
							<el-form-item label="密码" prop="pass">
								<el-input type="password" v-model="ruleForm.pass" autocomplete="off"></el-input>
							</el-form-item>
							<el-form-item label="确认密码" prop="checkPass">
								<el-input type="password" v-model="ruleForm.checkPass" autocomplete="off"></el-input>
							</el-form-item>
							<el-form-item style="margin-left: 30px;">
								<el-button type="primary" @click="submitForm('ruleForm')">提交</el-button>
								<el-button @click="resetForm('ruleForm')">重置</el-button>
							</el-form-item>
						</el-form>
					</el-tab-pane>
					
					<el-tab-pane label="添加管理员">
						<el-form :model="AddAdminForm" style="width: 400px;" :rules="addrules" ref="addruleForm">
							<el-form-item label="管理员ID" :label-width="formLabelWidth" prop="adminId">
								<el-input v-model="AddAdminForm.adminId" autocomplete="off"></el-input>
							</el-form-item>
							<el-form-item label="管理员昵称" :label-width="formLabelWidth" prop="adminName">
								<el-input v-model="AddAdminForm.adminName" autocomplete="off"></el-input>
							</el-form-item>
							<el-form-item label="密码" :label-width="formLabelWidth" prop="adminPwd">
								<el-input type="password" v-model="AddAdminForm.adminPwd" autocomplete="off"></el-input>
							</el-form-item>
							<el-form-item label="确认密码" :label-width="formLabelWidth" prop="adminPwd1">
								<el-input type="password" v-model="AddAdminForm.adminPwd1" autocomplete="off"></el-input>
							</el-form-item>
							<el-form-item label="性别" :label-width="formLabelWidth" prop="adminSex">
								<el-select v-model="AddAdminForm.adminSex" placeholder="请选择性别">
									<el-option label="男" value="男"></el-option>
									<el-option label="女" value="女"></el-option>
								</el-select>
							</el-form-item>
							<el-form-item label="生日" :label-width="formLabelWidth" prop="adminBirthday">
								<el-date-picker v-model="AddAdminForm.adminBirthday" type="date" value-format="yyyy-MM-dd" placeholder="选择日期">
								</el-date-picker>
							</el-form-item>
						</el-form>
						<div style="margin-left: 140px;">
							<el-button type="primary" @click="AddAdminSure('addruleForm')">确 定</el-button>
							<el-button @click="AddAdminReset('addruleForm')">重 置</el-button>
						</div>
					</el-tab-pane>
					
				</el-tabs>
			</div>
		</template>
		
		
		
		<!-- 商品类型 -->
		<template id="bigtype">
			<div id="">
				<p class="tap">类型信息</p>
				<el-divider></el-divider>
				<table border="0" height="50px" class="tap_input">
					<tr>
						<td>
							<el-input placeholder="请输入类型编号" v-model="Search.bigtypeId">
								<i slot="prefix" class="el-input__icon el-icon-search"></i>
							</el-input>
						</td>
						<td width="20px"></td>
						<td>
							<el-input placeholder="请输入类型名称" v-model="Search.bigtypeName">
								<i slot="prefix" class="el-input__icon el-icon-search"></i>
							</el-input>
						</td>
						<td width="60px"></td>
						<td>
							<el-button type="primary" icon="el-icon-search" @click="SearchBigType()">搜索</el-button>
						</td>
						<td width="40px"></td>
						<td>
							<el-button type="primary" icon="el-icon-zoom-in" @click="AddBigType()">添加</el-button>
						</td>
					</tr>
				</table>
				<el-table :data="datas">
					<el-table-column prop="bigtypeId" label="编号" align="center">
					</el-table-column>
					<el-table-column prop="bigtypeName" label="名称" align="center">
					</el-table-column>
					<el-table-column label="操作" align="center">
						<template slot-scope="scope">
							<el-button type="primary" @click="UpBigType(scope.row)" icon="el-icon-edit" circle></el-button>
							<el-button type="danger" @click="DelBigType(scope.row.bigtypeId)" icon="el-icon-delete" circle></el-button>
						</template>
					</el-table-column>
				</el-table>
				<el-pagination style="margin-top: 20px;text-align: right;" background :current-page.sync="listPage" @current-change="handleCurrentChange" layout="prev, pager, next"
				 :total="total" :page-size="pagesize">
				</el-pagination>
				<!-- 添加界面 -->
				<el-dialog title="添加类型信息" :visible.sync="AddBigTypeFormShow">
					<el-form :model="AddBigTypeForm">
						<el-form-item label="类型编号" :label-width="formLabelWidth">
							<el-input v-model="AddBigTypeForm.bigtypeId" autocomplete="off"></el-input>
						</el-form-item>
						<el-form-item label="类型名称" :label-width="formLabelWidth">
							<el-input v-model="AddBigTypeForm.bigtypeName" autocomplete="off"></el-input>
						</el-form-item>
					</el-form>
					<div slot="footer" class="dialog-footer">
						<el-button @click="AddBigTypeCancel()">取 消</el-button>
						<el-button type="primary" @click="AddBigTypeSure()">确 定</el-button>
					</div>
				</el-dialog>
				<!-- 修改界面 -->
				<el-dialog title="修改类型信息" :visible.sync="UpBigTypeFormShow">
					<el-form :model="UpBigTypeForm">
						<el-form-item label="类型编号" :label-width="formLabelWidth">
							<el-input v-model="UpBigTypeForm.bigtypeId" autocomplete="off" :disabled="true"></el-input>
						</el-form-item>
						<el-form-item label="类型名称" :label-width="formLabelWidth">
							<el-input v-model="UpBigTypeForm.bigtypeName" autocomplete="off"></el-input>
						</el-form-item>
					</el-form>
					<div slot="footer" class="dialog-footer">
						<el-button @click="UpBigTypeFormShow = false">取 消</el-button>
						<el-button type="primary" @click="UpBigTypeSure()">确 定</el-button>
					</div>
				</el-dialog>
			</div>		
		</template>
		
		<template id="countrytype">
		    <div id="">
		        <p class="tap">类型信息</p>
		        <el-divider></el-divider>
		        <table border="0" height="50px" class="tap_input">
		            <tr>
		                <td>
		                    <el-input placeholder="请输入类型编号" v-model="Search.typeId">
		                        <i slot="prefix" class="el-input__icon el-icon-search"></i>
		                    </el-input>
		                </td>
		                <td width="20px"></td>
		                <td>
		                    <el-input placeholder="请输入原产地" v-model="Search.typeName">
		                        <i slot="prefix" class="el-input__icon el-icon-search"></i>
		                    </el-input>
		                </td>
		                <td width="60px"></td>
		                <td>
		                    <el-button type="primary" icon="el-icon-search" @click="SearchGoodsType()">搜索</el-button>
		                </td>
		                <td width="40px"></td>
		                <td>
		                    <el-button type="primary" icon="el-icon-zoom-in" @click="AddGoodsType()">添加</el-button>
		                </td>
		            </tr>
		        </table>
		        <el-table :data="datas" max-height="420">
		            <el-table-column prop="typeId" label="类型ID" align="center">
		            </el-table-column>
		            <el-table-column prop="typeName" label="原产地" align="center">
		            </el-table-column>
		            <el-table-column prop="bigtypeId" label="父类ID" align="center">
		            </el-table-column>
		            <el-table-column label="操作" align="center">
		                <template slot-scope="scope">
		                    <el-button type="primary" @click="UpGoodsType(scope.row)" icon="el-icon-edit" circle></el-button>
		                    <el-button type="danger" @click="DelGoodsType(scope.row.typeId)" icon="el-icon-delete" circle></el-button>
		                </template>
		            </el-table-column>
		        </el-table>
		        <el-pagination style="margin-top: 20px;text-align: right;" background :current-page.sync="listPage" @current-change="handleCurrentChange" layout="prev, pager, next"
		            :total="total" :page-size="pagesize" v-if="flag">
		        </el-pagination>
		        <!-- 添加界面 -->
		        <el-dialog title="添加类型" :visible.sync="AddGoodsTypeFormShow">
		            <el-form :model="AddGoodsTypeForm">
		                <el-form-item label="类型编号" :label-width="formLabelWidth">
		                    <el-input v-model="AddGoodsTypeForm.typeId" autocomplete="off"></el-input>
		                </el-form-item>
		                <el-form-item label="原产地" :label-width="formLabelWidth">
		                    <el-input v-model="AddGoodsTypeForm.typeName" autocomplete="off"></el-input>
		                </el-form-item>
		                <el-form-item label="父类ID" :label-width="formLabelWidth">
		                    <el-input v-model="AddGoodsTypeForm.bigtypeId" autocomplete="off"></el-input>
		                </el-form-item>
		            </el-form>
		            <div slot="footer" class="dialog-footer">
		                <el-button @click="AddGoodsTypeCancel()">取 消</el-button>
		                <el-button type="primary" @click="AddGoodsTypeSure()">确 定</el-button>
		            </div>
		        </el-dialog>
		        <!-- 修改界面 -->
		        <el-dialog title="修改类型" :visible.sync="UpGoodsTypeFormShow">
		            <el-form :model="UpGoodsTypeForm">
		                <el-form-item label="类型编号" :label-width="formLabelWidth">
		                    <el-input v-model="UpGoodsTypeForm.typeId" autocomplete="off" :disabled="true"></el-input>
		                </el-form-item>
		                <el-form-item label="原产地" :label-width="formLabelWidth">
		                    <el-input v-model="UpGoodsTypeForm.typeName" autocomplete="off"></el-input>
		                </el-form-item>
		                <el-form-item label="父类ID" :label-width="formLabelWidth">
		                    <el-input v-model="UpGoodsTypeForm.bigtypeId" autocomplete="off" :disabled="true"></el-input>
		                </el-form-item>
		            </el-form>
		            <div slot="footer" class="dialog-footer">
		                <el-button @click="UpGoodsTypeFormShow = false">取 消</el-button>
		                <el-button type="primary" @click="UpGoodsTypeSure()">确 定</el-button>
		            </div>
		        </el-dialog>
		    </div>
		</template>
		
		<template id="pricetype">
		    <div id="">
		        <p class="tap">类型信息</p>
		        <el-divider></el-divider>
		        <table border="0" height="50px" class="tap_input">
		            <tr>
		                <td>
		                    <el-input placeholder="请输入类型编号" v-model="Search.typeId">
		                        <i slot="prefix" class="el-input__icon el-icon-search"></i>
		                    </el-input>
		                </td>
		                <td width="20px"></td>
		                <td>
		                    <el-input placeholder="请输入价格区间" v-model="Search.typeName">
		                        <i slot="prefix" class="el-input__icon el-icon-search"></i>
		                    </el-input>
		                </td>
		                <td width="60px"></td>
		                <td>
		                    <el-button type="primary" icon="el-icon-search" @click="SearchGoodsType()">搜索</el-button>
		                </td>
		                <td width="40px"></td>
		                <td>
		                    <el-button type="primary" icon="el-icon-zoom-in" @click="AddGoodsType()">添加</el-button>
		                </td>
		            </tr>
		        </table>
		        <el-table :data="datas" max-height="420">
		            <el-table-column prop="typeId" label="类型ID" align="center">
		            </el-table-column>
		            <el-table-column prop="typeName" label="价格区间" align="center">
		            </el-table-column>
		            <el-table-column prop="bigtypeId" label="父类ID" align="center">
		            </el-table-column>
		            <el-table-column label="操作" align="center">
		                <template slot-scope="scope">
		                    <el-button type="primary" @click="UpGoodsType(scope.row)" icon="el-icon-edit" circle></el-button>
		                    <el-button type="danger" @click="DelGoodsType(scope.row.typeId)" icon="el-icon-delete" circle></el-button>
		                </template>
		            </el-table-column>
		        </el-table>
		        <el-pagination style="margin-top: 20px;text-align: right;" background :current-page.sync="listPage" @current-change="handleCurrentChange" layout="prev, pager, next"
		            :total="total" :page-size="pagesize" v-if="flag">
		        </el-pagination>
		        <!-- 添加界面 -->
		        <el-dialog title="添加类型" :visible.sync="AddGoodsTypeFormShow">
		            <el-form :model="AddGoodsTypeForm">
		                <el-form-item label="类型编号" :label-width="formLabelWidth">
		                    <el-input v-model="AddGoodsTypeForm.typeId" autocomplete="off"></el-input>
		                </el-form-item>
		                <el-form-item label="价格区间" :label-width="formLabelWidth">
		                    <el-input v-model="AddGoodsTypeForm.typeName" autocomplete="off"></el-input>
		                </el-form-item>
		                <el-form-item label="父类ID" :label-width="formLabelWidth">
		                    <el-input v-model="AddGoodsTypeForm.bigtypeId" autocomplete="off"></el-input>
		                </el-form-item>
		            </el-form>
		            <div slot="footer" class="dialog-footer">
		                <el-button @click="AddGoodsTypeCancel()">取 消</el-button>
		                <el-button type="primary" @click="AddGoodsTypeSure()">确 定</el-button>
		            </div>
		        </el-dialog>
		        <!-- 修改界面 -->
		        <el-dialog title="修改类型" :visible.sync="UpGoodsTypeFormShow">
		            <el-form :model="UpGoodsTypeForm">
		                <el-form-item label="类型编号" :label-width="formLabelWidth">
		                    <el-input v-model="UpGoodsTypeForm.typeId" autocomplete="off" :disabled="true"></el-input>
		                </el-form-item>
		                <el-form-item label="价格区间" :label-width="formLabelWidth">
		                    <el-input v-model="UpGoodsTypeForm.typeName" autocomplete="off"></el-input>
		                </el-form-item>
		                <el-form-item label="父类ID" :label-width="formLabelWidth">
		                    <el-input v-model="UpGoodsTypeForm.bigtypeId" autocomplete="off" :disabled="true"></el-input>
		                </el-form-item>
		            </el-form>
		            <div slot="footer" class="dialog-footer">
		                <el-button @click="UpGoodsTypeFormShow = false">取 消</el-button>
		                <el-button type="primary" @click="UpGoodsTypeSure()">确 定</el-button>
		            </div>
		        </el-dialog>
		    </div>		
		</template>
		
		<template id="recommendtype">
		    <div id="">
		        <p class="tap">类型信息</p>
		        <el-divider></el-divider>
		        <table border="0" height="50px" class="tap_input">
		            <tr>
		                <td>
		                    <el-input placeholder="请输入类型编号" v-model="Search.typeId">
		                        <i slot="prefix" class="el-input__icon el-icon-search"></i>
		                    </el-input>
		                </td>
		                <td width="20px"></td>
		                <td>
		                    <el-input placeholder="请输入推荐类型" v-model="Search.typeName">
		                        <i slot="prefix" class="el-input__icon el-icon-search"></i>
		                    </el-input>
		                </td>
		                <td width="60px"></td>
		                <td>
		                    <el-button type="primary" icon="el-icon-search" @click="SearchGoodsType()">搜索</el-button>
		                </td>
		                <td width="40px"></td>
		                <td>
		                    <el-button type="primary" icon="el-icon-zoom-in" @click="AddGoodsType()">添加</el-button>
		                </td>
		            </tr>
		        </table>
		        <el-table :data="datas" max-height="420">
		            <el-table-column prop="typeId" label="类型ID" align="center">
		            </el-table-column>
		            <el-table-column prop="typeName" label="推荐类型" align="center">
		            </el-table-column>
		            <el-table-column prop="bigtypeId" label="父类ID" align="center">
		            </el-table-column>
		            <el-table-column label="操作" align="center">
		                <template slot-scope="scope">
		                    <el-button type="primary" @click="UpGoodsType(scope.row)" icon="el-icon-edit" circle></el-button>
		                    <el-button type="danger" @click="DelGoodsType(scope.row.typeId)" icon="el-icon-delete" circle></el-button>
		                </template>
		            </el-table-column>
		        </el-table>
		        <el-pagination style="margin-top: 20px;text-align: right;" background :current-page.sync="listPage" @current-change="handleCurrentChange" layout="prev, pager, next"
		            :total="total" :page-size="pagesize" v-if="flag">
		        </el-pagination>
		        <!-- 添加界面 -->
		        <el-dialog title="添加类型" :visible.sync="AddGoodsTypeFormShow">
		            <el-form :model="AddGoodsTypeForm">
		                <el-form-item label="类型编号" :label-width="formLabelWidth">
		                    <el-input v-model="AddGoodsTypeForm.typeId" autocomplete="off"></el-input>
		                </el-form-item>
		                <el-form-item label="推荐类型" :label-width="formLabelWidth">
		                    <el-input v-model="AddGoodsTypeForm.typeName" autocomplete="off"></el-input>
		                </el-form-item>
		                <el-form-item label="父类ID" :label-width="formLabelWidth">
		                    <el-input v-model="AddGoodsTypeForm.bigtypeId" autocomplete="off"></el-input>
		                </el-form-item>
		            </el-form>
		            <div slot="footer" class="dialog-footer">
		                <el-button @click="AddGoodsTypeCancel()">取 消</el-button>
		                <el-button type="primary" @click="AddGoodsTypeSure()">确 定</el-button>
		            </div>
		        </el-dialog>
		        <!-- 修改界面 -->
		        <el-dialog title="修改类型" :visible.sync="UpGoodsTypeFormShow">
		            <el-form :model="UpGoodsTypeForm">
		                <el-form-item label="类型编号" :label-width="formLabelWidth">
		                    <el-input v-model="UpGoodsTypeForm.typeId" autocomplete="off" :disabled="true"></el-input>
		                </el-form-item>
		                <el-form-item label="推荐类型" :label-width="formLabelWidth">
		                    <el-input v-model="UpGoodsTypeForm.typeName" autocomplete="off"></el-input>
		                </el-form-item>
		                <el-form-item label="父类ID" :label-width="formLabelWidth">
		                    <el-input v-model="UpGoodsTypeForm.bigtypeId" autocomplete="off" :disabled="true"></el-input>
		                </el-form-item>
		            </el-form>
		            <div slot="footer" class="dialog-footer">
		                <el-button @click="UpGoodsTypeFormShow = false">取 消</el-button>
		                <el-button type="primary" @click="UpGoodsTypeSure()">确 定</el-button>
		            </div>
		        </el-dialog>
		    </div>		
		</template>
		
		
		<template id="tooltype">
		    <div id="">
		        <p class="tap">类型信息</p>
		        <el-divider></el-divider>
		        <table border="0" height="50px" class="tap_input">
		            <tr>
		                <td>
		                    <el-input placeholder="请输入类型编号" v-model="Search.typeId">
		                        <i slot="prefix" class="el-input__icon el-icon-search"></i>
		                    </el-input>
		                </td>
		                <td width="20px"></td>
		                <td>
		                    <el-input placeholder="请输入酒具名称" v-model="Search.typeName">
		                        <i slot="prefix" class="el-input__icon el-icon-search"></i>
		                    </el-input>
		                </td>
		                <td width="60px"></td>
		                <td>
		                    <el-button type="primary" icon="el-icon-search" @click="SearchGoodsType()">搜索</el-button>
		                </td>
		                <td width="40px"></td>
		                <td>
		                    <el-button type="primary" icon="el-icon-zoom-in" @click="AddGoodsType()">添加</el-button>
		                </td>
		            </tr>
		        </table>
		        <el-table :data="datas" max-height="420">
		            <el-table-column prop="typeId" label="类型ID" align="center">
		            </el-table-column>
		            <el-table-column prop="typeName" label="酒具名称" align="center">
		            </el-table-column>
		            <el-table-column prop="bigtypeId" label="父类ID" align="center">
		            </el-table-column>
		            <el-table-column label="操作" align="center">
		                <template slot-scope="scope">
		                    <el-button type="primary" @click="UpGoodsType(scope.row)" icon="el-icon-edit" circle></el-button>
		                    <el-button type="danger" @click="DelGoodsType(scope.row.typeId)" icon="el-icon-delete" circle></el-button>
		                </template>
		            </el-table-column>
		        </el-table>
		        <el-pagination style="margin-top: 20px;text-align: right;" background :current-page.sync="listPage" @current-change="handleCurrentChange" layout="prev, pager, next"
		            :total="total" :page-size="pagesize" v-if="flag">
		        </el-pagination>
		        <!-- 添加界面 -->
		        <el-dialog title="添加类型" :visible.sync="AddGoodsTypeFormShow">
		            <el-form :model="AddGoodsTypeForm">
		                <el-form-item label="类型编号" :label-width="formLabelWidth">
		                    <el-input v-model="AddGoodsTypeForm.typeId" autocomplete="off"></el-input>
		                </el-form-item>
		                <el-form-item label="酒具名称" :label-width="formLabelWidth">
		                    <el-input v-model="AddGoodsTypeForm.typeName" autocomplete="off"></el-input>
		                </el-form-item>
		                <el-form-item label="父类ID" :label-width="formLabelWidth">
		                    <el-input v-model="AddGoodsTypeForm.bigtypeId" autocomplete="off"></el-input>
		                </el-form-item>
		            </el-form>
		            <div slot="footer" class="dialog-footer">
		                <el-button @click="AddGoodsTypeCancel()">取 消</el-button>
		                <el-button type="primary" @click="AddGoodsTypeSure()">确 定</el-button>
		            </div>
		        </el-dialog>
		        <!-- 修改界面 -->
		        <el-dialog title="修改类型" :visible.sync="UpGoodsTypeFormShow">
		            <el-form :model="UpGoodsTypeForm">
		                <el-form-item label="类型编号" :label-width="formLabelWidth">
		                    <el-input v-model="UpGoodsTypeForm.typeId" autocomplete="off" :disabled="true"></el-input>
		                </el-form-item>
		                <el-form-item label="酒具名称" :label-width="formLabelWidth">
		                    <el-input v-model="UpGoodsTypeForm.typeName" autocomplete="off"></el-input>
		                </el-form-item>
		                <el-form-item label="父类ID" :label-width="formLabelWidth">
		                    <el-input v-model="UpGoodsTypeForm.bigtypeId" autocomplete="off" :disabled="true"></el-input>
		                </el-form-item>
		            </el-form>
		            <div slot="footer" class="dialog-footer">
		                <el-button @click="UpGoodsTypeFormShow = false">取 消</el-button>
		                <el-button type="primary" @click="UpGoodsTypeSure()">确 定</el-button>
		            </div>
		        </el-dialog>
		    </div>		
		</template>
		
		<template id="winetype">
		    <div id="">
		        <p class="tap">类型信息</p>
		        <el-divider></el-divider>
		        <table border="0" height="50px" class="tap_input">
		            <tr>
		                <td>
		                    <el-input placeholder="请输入类型编号" v-model="Search.typeId">
		                        <i slot="prefix" class="el-input__icon el-icon-search"></i>
		                    </el-input>
		                </td>
		                <td width="20px"></td>
		                <td>
		                    <el-input placeholder="请输入酒类名称" v-model="Search.typeName">
		                        <i slot="prefix" class="el-input__icon el-icon-search"></i>
		                    </el-input>
		                </td>
		                <td width="60px"></td>
		                <td>
		                    <el-button type="primary" icon="el-icon-search" @click="SearchGoodsType()">搜索</el-button>
		                </td>
		                <td width="40px"></td>
		                <td>
		                    <el-button type="primary" icon="el-icon-zoom-in" @click="AddGoodsType()">添加</el-button>
		                </td>
		            </tr>
		        </table>
		        <el-table :data="datas" max-height="420">
		            <el-table-column prop="typeId" label="类型ID" align="center">
		            </el-table-column>
		            <el-table-column prop="typeName" label="酒类名称" align="center">
		            </el-table-column>
		            <el-table-column prop="bigtypeId" label="父类ID" align="center">
		            </el-table-column>
		            <el-table-column label="操作" align="center">
		                <template slot-scope="scope">
							<el-button type="primary" @click="UpGoodsType(scope.row)" icon="el-icon-edit" circle></el-button>
		                    <el-button type="danger" @click="DelGoodsType(scope.row.typeId)" icon="el-icon-delete" circle></el-button>
		                </template>
		            </el-table-column>
		        </el-table>
		        <el-pagination style="margin-top: 20px;text-align: right;" background :current-page.sync="listPage" @current-change="handleCurrentChange" layout="prev, pager, next"
		            :total="total" :page-size="pagesize" v-if="flag">
		        </el-pagination>
		        <!-- 添加界面 -->
		        <el-dialog title="添加类型" :visible.sync="AddGoodsTypeFormShow">
		            <el-form :model="AddGoodsTypeForm">
		                <el-form-item label="类型编号" :label-width="formLabelWidth">
		                    <el-input v-model="AddGoodsTypeForm.typeId" autocomplete="off"></el-input>
		                </el-form-item>
		                <el-form-item label="酒类名称" :label-width="formLabelWidth">
		                    <el-input v-model="AddGoodsTypeForm.typeName" autocomplete="off"></el-input>
		                </el-form-item>
		                <el-form-item label="父类ID" :label-width="formLabelWidth">
		                    <el-input v-model="AddGoodsTypeForm.bigtypeId" autocomplete="off"></el-input>
		                </el-form-item>
		            </el-form>
		            <div slot="footer" class="dialog-footer">
		                <el-button @click="AddGoodsTypeCancel()">取 消</el-button>
		                <el-button type="primary" @click="AddGoodsTypeSure()">确 定</el-button>
		            </div>
		        </el-dialog>
		        <!-- 修改界面 -->
		        <el-dialog title="修改类型" :visible.sync="UpGoodsTypeFormShow">
		            <el-form :model="UpGoodsTypeForm">
		                <el-form-item label="类型编号" :label-width="formLabelWidth">
		                    <el-input v-model="UpGoodsTypeForm.typeId" autocomplete="off" :disabled="true"></el-input>
		                </el-form-item>
		                <el-form-item label="酒类名称" :label-width="formLabelWidth">
		                    <el-input v-model="UpGoodsTypeForm.typeName" autocomplete="off"></el-input>
		                </el-form-item>
		                <el-form-item label="父类ID" :label-width="formLabelWidth">
		                    <el-input v-model="UpGoodsTypeForm.bigtypeId" autocomplete="off" :disabled="true"></el-input>
		                </el-form-item>
		            </el-form>
		            <div slot="footer" class="dialog-footer">
		                <el-button @click="UpGoodsTypeFormShow = false">取 消</el-button>
		                <el-button type="primary" @click="UpGoodsTypeSure()">确 定</el-button>
		            </div>
		        </el-dialog>
		    </div>		
		</template>
		
		
		
		<script type="text/javascript">
			    // 路由表
			    const router = new VueRouter({
					routes:[
					// 商品信息
					{
						path:'/goods',
						name:'goods',
						component:{
							template:'#goods',
							data(){
								return {
									datas:[],
									total: 10,
									pagesize: 4,
									listPage: 1,
									flag: true,
									
									Search: {
										goodsId: "",
										goodsName: "",
										goodsPrice: "",
										typeId: ""
									},
									
									AddGoodsFormShow: false,
									formLabelWidth: "120px",
									
									AddGoodsForm: {
										goodsId: "",
										typeId: "",
										goodsName: "",
										goodsIcon: "",
										goodsPrice: "",
										repertory: ""
									},
									rules: {
										goodsId: [
											{required: true, message: '商品ID不能为空', trigger: 'blur'}, {type: 'number', message: '商品ID应为数字值',  trigger: 'blur'}
										],
										typeId: [
											{required: true, message: '类型ID不能为空',  trigger: 'blur'}, {type: 'number', message: '类型ID应为数字值',  trigger: 'blur'}
										],
										goodsName: [
											{required: true, message: '商品名称不能为空'}
										],
										goodsIcon: [
											{required: true, message: '图片链接不能为空'}
										],
										goodsPrice: [
											{required: true, message: '售价不能为空'}, {type: 'number', message: '售价必须为数字值'}
										],
										repertory: [
											{required: true, message: '库存不能为空'}
										]
									},
									
									UpGoodsFormShow: false,
									UpGoodsForm: {
										goodsId: "",
										typeId: "",
										goodsName: "",
										goodsIcon: "",
										goodsPrice: "",
										repertory: "",
										createTime: ""
									},
									
								}
							},
							created:function(){
								this.create(1);
							},
							methods:{
								create(pagenum){
									axios.post("http://localhost/SweetWine/getAllGoods.action?pagenum="+ pagenum + "&pagesize="+this.pagesize)
									.then(res=>{
										this.total = res.data.total;
										this.datas=res.data.list;
									})
								},
								handleCurrentChange(val) {
									this.create(val)
								},
								SearchGoods() {
									axios.post("http://localhost/SweetWine/SearchGoods.action", this.Search)
									.then(res => {
										this.datas = res.data;
										this.Search={};
										this.flag = false;
									})
								},
								
								AddGoods() {
									this.AddGoodsFormShow = true;
								},
								AddGoodsCancel(){
									this.AddGoodsFormShow = false;
									this.AddGoodsForm={};
								},
								AddGoodsSure(formName) {
									this.AddGoodsForm.createTime=this.getNowTime();
									this.AddGoodsForm.updateTime=this.getNowTime();
									this.$refs[formName].validate((valid) => {
										if (valid) {
											axios.post("http://localhost/SweetWine/AddGoods.action", this.AddGoodsForm)
											.then(res => {
												if (res.data == "AddOK") {
													this.AddGoodsForm={};
													this.AddGoodsFormShow = false;
													this.create(1);
													this.listPage = 1;
													alert("添加成功");
												}
											})
										} else {
											alert("添加失败");
											return false;
										}
									});
								
								},
								UpGoods(val) {
									this.UpGoodsForm = JSON.parse(JSON.stringify(val));
									this.UpGoodsFormShow = true;
								},
								UpGoodsSure() {
									this.UpGoodsForm.updateTime=this.getNowTime();
									axios.post("http://localhost/SweetWine/UpGoods.action", this.UpGoodsForm)
									.then(res => {
										if (res.data == "UpOK") {
											this.UpGoodsFormShow = false;
											this.create(1);
											this.listPage = 1;
											alert("修改成功");
										} else {
											alert("修改失败");
										}
									})
								},
								DelGoods(val) {
									if (confirm("确定要删除这项数据吗？")) {
										axios.post("http://localhost/SweetWine/DelGoods.action?goodsId=" + val)
										.then(res => {
											if (res.data == "DelOK") {
												this.handleCurrentChange(1);
												alert("删除成功！");
											} else {
												alert("删除失败！");
											}
										})
									}
								},
								getNowTime: function () {
									let dateTime
									let yy = new Date().getFullYear()
									let mm = (new Date().getMonth() + 1) < 10 ? '0'+ (new Date().getMonth() + 1):new Date().getMonth() + 1
									let dd = new Date().getDate() < 10 ? '0' + new Date().getDate():new Date().getDate();
									let hh = new Date().getHours() < 10 ? '0' + new Date().getHours():new Date().getHours();
									let mf = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes():new Date().getMinutes();
									let ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds():new Date().getSeconds();
									dateTime = yy + '-' + mm + '-' + dd + ' ' + hh + ':' + mf + ':' + ss
									return dateTime;
								}
							}
						}
					},
					{
						path:'/pics',
						name:'pics',
						component:{
							template:'#pics',
							data(){
								return {
									datas:[],
									total: 10,
									pagesize: 5,
									listPage: 1,
									flag:true,
									
									Search: {
										goodsId: ""
									},
									
									AddPicsFormShow: false,
									formLabelWidth: "120px",
									
									AddPicsForm: {
										goodsId: "",
										picsUrl:""
									},
									
									UpPicsFormShow: false,
									UpPicsForm: {
										picsId: "",
										picsUrl: "",
										goodsId: ""
									},
									
								}
							},
							created:function(){
								this.create(1);
							},
							methods:{
								create(pagenum){
									axios.post("http://localhost/SweetWine/getAllPics.action?pagenum="+ pagenum + "&pagesize="+this.pagesize)
									.then(res=>{
										this.total = res.data.total;
										this.datas=res.data.list;
									})
								},
								handleCurrentChange(val) {
									this.create(val)
								},
								
								SearchPics() {
									axios.post("http://localhost/SweetWine/SearchPics.action", this.Search)
									.then(res => {
										this.datas = res.data;
										this.Search={};
										this.flag = false;
									})
								},
								
								AddPics() {
									this.AddPicsFormShow = true;
								},
								AddPicsCancel(){
									this.AddPicsFormShow = false;
									this.AddPicsForm={};
								},
								AddPicsSure() {
									axios.post("http://localhost/SweetWine/AddPics.action", this.AddPicsForm)
									.then(res => {
										if (res.data == "AddOK") {
											this.AddPicsForm={};
											this.AddPicsFormShow = false;
											this.create(1);
											this.listPage = 1;
											alert("添加成功");
										}
									})
								},
								UpPics(val) {
									this.UpPicsForm = JSON.parse(JSON.stringify(val));
									this.UpPicsFormShow = true;
								},
								UpPicsSure() {
									axios.post("http://localhost/SweetWine/UpPics.action", this.UpPicsForm)
									.then(res => {
										if (res.data == "UpOK") {
											this.UpPicsFormShow = false;
											this.create(1);
											this.listPage = 1;
											alert("修改成功");
										} else {
											alert("修改失败");
										}
									})
								},
								DelPics(val) {
									if (confirm("确定要删除这项数据吗？")) {
										axios.post("http://localhost/SweetWine/DelPics.action?picsId=" + val)
										.then(res => {
											if (res.data == "DelOK") {
												this.handleCurrentChange(1);
												alert("删除成功！");
											} else {
												alert("删除失败！");
											}
										})
									}
								},
							}
						}
					},
					{
						path:'/goodsdetail',
						name:'goodsdetail',
						component:{
							template:'#goodsdetail',
							data(){
								return {
									datas:[],
									total: 10,
									pagesize: 5,
									listPage: 1,
									flag:true,
																		
									Search: {
										goodsId: ""
									},
									
									AddGoodsDetailFormShow: false,
									formLabelWidth: "120px",
									
									AddGoodsDetailForm: {
										goodsId: "",
										goodsdetailUrl:""
									},
									
									UpGoodsDetailFormShow: false,
									UpGoodsDetailForm: {
										goodsdetailId: "",
										goodsdetailUrl: "",
										goodsId: ""
									},
									
								}
							},
							created:function(){
								this.create(1);
							},
							methods:{
								create(pagenum){
									axios.post("http://localhost/SweetWine/getAllGoodsDetail.action?pagenum="+ pagenum + "&pagesize="+this.pagesize)
									.then(res=>{
										this.total = res.data.total;
										this.datas=res.data.list;
									})
								},
								handleCurrentChange(val) {
									this.create(val)
								},
								
								SearchGoodsDetail() {
									axios.post("http://localhost/SweetWine/SearchGoodsDetail.action", this.Search)
									.then(res => {
										this.datas = res.data;
										this.Search={};
										this.flag = false;
									})
								},
								
								AddGoodsDetail() {
									this.AddGoodsDetailFormShow = true;
								},
								AddGoodsDetailCancel(){
									this.AddGoodsDetailFormShow = false;
									this.AddGoodsDetailForm={};
								},
								AddGoodsDetailSure() {
									axios.post("http://localhost/SweetWine/AddGoodsDetail.action", this.AddGoodsDetailForm)
									.then(res => {
										if (res.data == "AddOK") {
											this.AddGoodsDetailForm={};
											this.AddGoodsDetailFormShow = false;
											this.create(1);
											this.listPage = 1;
											alert("添加成功");
										}
									})
								},
								UpGoodsDetail(val) {
									this.UpGoodsDetailForm = JSON.parse(JSON.stringify(val));
									this.UpGoodsDetailFormShow = true;
								},
								UpGoodsDetailSure() {
									axios.post("http://localhost/SweetWine/UpGoodsDetail.action", this.UpGoodsDetailForm)
									.then(res => {
										if (res.data == "UpOK") {
											this.UpGoodsDetailFormShow = false;
											this.create(1);
											this.listPage = 1;
											alert("修改成功");
										} else {
											alert("修改失败");
										}
									})
								},
								DelGoodsDetail(val) {
									if (confirm("确定要删除这项数据吗？")) {
										axios.post("http://localhost/SweetWine/DelGoodsDetail.action?goodsdetailId=" + val)
										.then(res => {
											if (res.data == "DelOK") {
												this.handleCurrentChange(1);
												alert("删除成功！");
											} else {
												alert("删除失败！");
											}
										})
									}
								},
								
							}
						}
					},
					
					// 小程序首页轮播图
					{
						path:'/swiper',
						name:'swiper',
						component:{
							template:'#swiper',
							data(){
								return {
									datas:[],
									total: 10,
									pagesize: 4,
									listPage: 1,
									flag: true,
									
									Search: {
										swiperId: "",
										goodsId: "",
										swiperUrl: "",
									},
									
									AddSwiperFormShow: false,
									formLabelWidth: "120px",
									
									AddSwiperForm: {
										swiperId: "",
										swiperUrl: "",
										goodsId: ""
									},
									
									UpSwiperFormShow: false,
									UpSwiperForm: {
										swiperId: "",
										swiperUrl: "",
										goodsId: ""
									},
								}
							},
							created:function(){
								this.create(1);
							},
							methods:{
								create(pagenum){
									axios.post("http://localhost/SweetWine/getSwiperAndGoods.action?pagenum="+ pagenum + "&pagesize="+this.pagesize)
									.then(res=>{
										this.total = res.data.total;
										this.datas=res.data.list;
									})
								},
								handleCurrentChange(val) {
									this.create(val)
								},
								SearchSwiper() {
									axios.post("http://localhost/SweetWine/SearchSwiper.action",this.Search)
									.then(res=>{
										this.datas=res.data;
										this.Search={};
										this.flag = false;
									})
								},
								AddSwiper() {
									this.AddSwiperFormShow = true;
								},
								AddSwiperCancel(){
									this.AddSwiperFormShow = false;
									this.AddSwiperForm={};
								},
								AddSwiperSure() {
									axios.post("http://localhost/SweetWine/AddSwiper.action", this.AddSwiperForm)
									.then(res => {
										if (res.data == "AddOK") {
											this.AddSwiperFormShow = false;
											this.AddSwiperForm={};
											this.create(1);
											this.listPage = 1;
											alert("添加成功");
										}
									})
								},
								UpSwiper(val) {
									this.UpSwiperForm = JSON.parse(JSON.stringify(val));
									this.UpSwiperFormShow = true;
								},
								UpSwiperSure() {
									axios.post("http://localhost/SweetWine/UpSwiper.action", this.UpSwiperForm)
									.then(res => {
										if (res.data == "UpOK") {
											this.UpSwiperFormShow = false;
											this.create(1);
											this.listPage = 1;
											alert("修改成功");
										} else {
											alert("修改失败");
										}
									})
								},
								DelSwiper(val) {
									if (confirm("确定要删除这项数据吗？")) {
										axios.post("http://localhost/SweetWine/DelSwiper.action?swiperId=" + val)
										.then(res => {
											if (res.data == "DelOK") {
												this.handleCurrentChange(1);
												alert("删除成功！");
											} else {
												alert("删除失败！");
											}
										})
									}
								}
							}
						}
					},
					
					// 订单管理
					{
						path:'/orders',
						name:'orders',
						component:{
							template:'#orders',
							data(){
								return {
									datas:[],
									total: 10,
									pagesize: 4,
									listPage: 1,
									flag: true,
									
									Search: {
										orderId: "",
										consignee: "",
										addressId: "",
										orderStart: ""
									},
									
									formLabelWidth: "120px",
									UpOrdersFormShow: false,
									UpOrdersForm: {
										orderId: "",
										orderStart: "",
										createTime: ""
									}
								}
							},
							created:function(){
								this.create(1);
							},
							methods:{
								create(pagenum){
									axios.post("http://localhost/SweetWine/getOrdersAndAll.action?pagenum="+ pagenum + "&pagesize="+this.pagesize)
									.then(res=>{
										this.total = res.data.total;
										this.datas=res.data.list;
									})
								},
								handleCurrentChange(val) {
									this.create(val)
								},
								SearchOrders() {
									axios.post("http://localhost/SweetWine/SearchOrders.action",this.Search)
									.then(res=>{
										this.datas=res.data;
										this.Search={};
										this.flag = false;
									})
									
								},
								UpOrders(val) {
									this.UpOrdersForm = JSON.parse(JSON.stringify(val));
									this.UpOrdersFormShow = true;
								},
								UpOrdersSure() {
									this.UpOrdersForm.updateTime=this.getNowTime();
									axios.post("http://localhost/SweetWine/UpOrders.action",this.UpOrdersForm)
									.then(res=>{
										if (res.data == "UpOK") {
											this.UpOrdersFormShow = false;
											this.create(1);
											this.listPage = 1;
											alert("修改成功");
										} else {
											alert("修改失败");
										}
									})
								},
								DelOrders(val) {
									let order = JSON.parse(JSON.stringify(val));
									if (confirm("确定要删除这项数据吗？")) {
										if (order.orderStart=="已删除") {
											let oderId=order.orderId;
											axios.post("http://localhost/SweetWine/DelOrders.action?orderId=" + orderId)
											.then(res=>{
												if (res.data == "DelOK") {
													this.handleCurrentChange(1);
													alert("删除成功！");
												} else {
													alert("删除失败！");
												}
											})
										} else{
											alert("此订单未被用户删除，你暂无权限。。")
										}
										
									}
								},
								getNowTime: function () {
									let dateTime
									let yy = new Date().getFullYear()
									let mm = (new Date().getMonth() + 1) < 10 ? '0'+ (new Date().getMonth() + 1):new Date().getMonth() + 1
									let dd = new Date().getDate() < 10 ? '0' + new Date().getDate():new Date().getDate();
									let hh = new Date().getHours() < 10 ? '0' + new Date().getHours():new Date().getHours();
									let mf = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes():new Date().getMinutes();
									let ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds():new Date().getSeconds();
									dateTime = yy + '-' + mm + '-' + dd + ' ' + hh + ':' + mf + ':' + ss
									return dateTime;
								}
							}
						}
					},
					
					// 管理地址信息
					{
						path:'/address',
						name:'address',
						component:{
							template:'#address',
							data(){
								return {
									datas:[],
									total: 10,
									pagesize: 4,
									listPage: 1,
									flag: true,
									
									Search: {
										addressArea: "",
										consignee: "",
										userPhone: ""
									}
									
								}
							},
							created:function(){
								this.create(1);
							},
							methods:{
								create(pagenum){
									axios.post("http://localhost/SweetWine/getAllAddress.action?pagenum="+ pagenum + "&pagesize="+this.pagesize)
									.then(res=>{
										this.total = res.data.total;
										this.datas=res.data.list;
									})
								},
								handleCurrentChange(val) {
									this.create(val)
								},
								SearchAddress() {
									axios.post("http://localhost/SweetWine/SearchAddress.action", this.Search)
									.then(res => {
										this.datas = res.data;
										this.Search={};
										this.flag = false;
									})
								}
							}
						}
					},
					
					// 管理用户信息
					{
						path:'/user',
						name:'user',
						component:{
							template:'#user',
							data(){
								return {
									datas:[],
									total: 10,
									pagesize: 4,
									listPage: 1,
									flag: true,
									
									Search: {
										nickname: "",
										gender: "",
										city: ""
									},
									userstart:""
								}
							},
							created:function(){
								this.create(1);
							},
							methods:{
								create(pagenum){
									axios.post("http://localhost/SweetWine/getAllUser.action?pagenum="+ pagenum + "&pagesize="+this.pagesize)
									.then(res=>{
										this.total = res.data.total;
										this.datas=res.data.list;
									})
								},
								handleCurrentChange(val) {
									this.create(val)
								},
								SearchUser() {
									if(this.userstart !=''){
										if (this.userstart==="登录") {
											this.Search.haveuserinfo=true;
										} else{
											this.Search.haveuserinfo=false;
										}
									};
									axios.post("http://localhost/SweetWine/SearchUser.action",this.Search)
									.then(res=>{
										this.datas=res.data;
										this.Search={};
										this.flag = false;
									})
								},
								DelUser(val) {
									let user= JSON.parse(JSON.stringify(val));
									let yy = new Date().getFullYear();
									let mm = new Date().getMonth() + 1;
									if (confirm("确定要删除这项数据吗？")) {
										let year=parseInt(user.updateTime.substring(0,7));
										let month=parseInt(user.updateTime.substring(5,7));
										if ((yy-year>=3 && month>=mm) || yy-year>=4) {
											let userId=user.userId;
											axios.post("http://localhost/SweetWine/Deluser.action?userId=" + userId)
											.then(res=>{
												if (res.data == "DelOK") {
													this.handleCurrentChange(1);
													alert("删除成功！");
												} else {
													alert("删除失败！");
												}
											})
										} else{
											alert("该用户三年内使用过小程序，暂时无法删除。")
										}
									}
								}
							}
						}
					},
					
					// 管理员信息
					{
						path:'/admin',
						name:'admin',
						component:{
							template:'#admin',
							data(){
								ifUpAdmin:false;
								
								var validatePass = (rule, value, callback) => {
									if (value === '') {
										callback(new Error('请输入密码'));
									} else {
									  if (this.ruleForm.checkPass !== '') {
										this.$refs.ruleForm.validateField('checkPass');
									  }
									  callback();
									}
								};
								var validatePass2 = (rule, value, callback) => {
									if (value === '') {
									  callback(new Error('请再次输入密码'));
									} else if (value !== this.ruleForm.pass) {
									  callback(new Error('两次输入密码不一致!'));
									} else {
									  callback();
									}
								};
								
								var id = (rule, value, callback) => {
									if (value === '') {
										callback(new Error('请输入您的账号'));
									} else {
									  callback();
									}
								};
								var name = (rule, value, callback) => {
									if (value === '') {
										callback(new Error('请输入您的名字'));
									} else {
									  callback();
									}
								};
								
								var addPass = (rule, value, callback) => {
									if (value === '') {
										callback(new Error('请输入密码'));
									} else {
									  if (this.AddAdminForm.adminPwd !== '') {
										this.$refs.addruleForm.validateField('adminPwd1');
									  }
									  callback();
									}
								};
								var addPass1 = (rule, value, callback) => {
									if (value === '') {
									  callback(new Error('请再次输入密码'));
									} else if (value !== this.AddAdminForm.adminPwd) {
										  callback(new Error('两次输入密码不一致!'));
										} else {
										  callback();
										}
								};
								var sex = (rule, value, callback) => {
									if (value === '') {
										callback(new Error('请选择您的性别'));
									} else {
									  callback();
									}
								};
								var bir = (rule, value, callback) => {
									if (value === '') {
										callback(new Error('请选择您的生日'));
									} else {
									  if (this.AddAdminForm.adminPwd !== '') {
										this.$refs.ruleForm.validateField('adminPwd');
									  }
									  callback();
									}
								};
								return {
									
									addrules: {
										adminId:[
											{ validator: id, trigger: 'blur' }
										],
										adminName:[
											{ validator: name, trigger: 'blur' }
										],
										adminPwd: [
											{ validator: addPass, trigger: 'blur' }
										],
										adminPwd1: [
											{ validator: addPass1, trigger: 'blur' }
										],
										adminSex:[
											{ validator: sex, trigger: 'blur' }
										],
										adminBirthday:[
											{ validator: bir, trigger: 'blur' }
										]
									},
									
									formLabelWidth: "120px",
									AddAdminForm:{
										adminId:"",
										adminName:"",
										adminPwd:"",
										adminPwd1:"",
										adminSex:"",
										adminBirthday:""
									},
									
									UpAdminForm:{
										adminId:"",
										adminName:"",
										adminPwd:"",
										adminSex:"",
										adminBirthday:""
									},
									
									ruleForm: {
										pass: '',
										checkPass: '',
										oldpass: ''
									},
									rules: {
										pass: [
											{ validator: validatePass, trigger: 'blur' }
										],
										checkPass: [
											{ validator: validatePass2, trigger: 'blur' }
										]
									},
								}
							},
							created:function(){
								this.UpAdminForm = JSON.parse(sessionStorage.getItem("item"));
							},
							methods:{
								AddAdminReset(formName){
									this.$refs[formName].resetFields();
								},
								AddAdminSure(formName){
									this.$refs[formName].validate((valid) => {
										if (valid) {
											axios.post("http://localhost/SweetWine/AddAdmin.action", this.AddBigTypeForm)
											.then(res => {
												if (res.data == "AddOK") {
													alert("添加成功,退出系统。。");
													sessionStorage.clear();
													location.href = "Login.html";
												}
											})
										} else {
											alert("请输入完整信息")
										return false;
										}
									});
								},
								UpAdminReset(){
									if (this.ifUpAdmin) {
										axios.post("http://localhost/SweetWine/SearchAdmin.action", this.UpAdminForm)
										.then(res => {
											sessionStorage.setItem("item",JSON.stringify(res.data[0]));
										})
									}
									this.UpAdminForm = JSON.parse(sessionStorage.getItem("item"));
								},
								UpAdminSure(){
									this.ifUpAdmin=true;
									axios.post("http://localhost/SweetWine/UpAdmin.action", this.UpAdminForm)
									.then(res => {
										if (res.data == "UpOK") {
											axios.post("http://localhost/SweetWine/SearchAdmin.action", this.UpAdminForm)
											.then(res => {
												sessionStorage.setItem("item",JSON.stringify(res.data[0]));
												this.UpAdminForm = res.data[0];
												window.location.reload();
											})
										}
									})
								},
								submitForm(formName) {
									this.$refs[formName].validate((valid) => {
										if (valid) {
											if (this.UpAdminForm.adminPwd === this.ruleForm.oldpass) {
												let admin={
													adminId:this.UpAdminForm.adminId,
													adminPwd:this.ruleForm.pass
												}
												axios.post("http://localhost/SweetWine/UpAdmin.action", admin)
												.then(res => {
													if (res.data == "UpOK") {
														this.$refs[formName].resetFields();
														alert("修改成功,即将退出本系统");
														sessionStorage.clear();
														location.href = "Login.html";
													}
												})
											} else{
												alert("密码错误")
											}
										} else {
											return false;
										}
									});
								},
								resetForm(formName) {
									this.$refs[formName].resetFields();
								}
							}
						}
					},
					
					
					
					
					// 以下为类型管理
					{
					  path: '/bigtype',
					  name: 'bigtype',
					  component: {
					    template: '#bigtype',
						data(){
							return {
								datas:[],
								total: 10,
								pagesize: 5,
								listPage: 1,
								
								Search: {
									bigtypeId: "",
									bigtypeName: ""
								},
								
								AddBigTypeFormShow: false,
								formLabelWidth: "120px",
								
								AddBigTypeForm: {
									bigtypeId: "",
									bigtypeName: ""
								},
								
								UpBigTypeFormShow: false,
								UpBigTypeForm: {
									bigtypeId: "",
									bigtypeName: ""
								}
							}
						},
						created:function(){
							this.create(1);
						},
						methods:{
							create(pagenum){
								axios.post("http://localhost/SweetWine/getAllBigType.action?pagenum="+ pagenum + "&pagesize="+this.pagesize)
								.then(res=>{
									this.total = res.data.total;
									this.datas=res.data.list;
								})
							},
							handleCurrentChange(val) {
								this.create(val)
							},
							SearchBigType() {
								axios.post("http://localhost/SweetWine/SearchBigType.action", this.Search)
								.then(res => {
									this.datas = res.data;
									this.Search={};
									this.flag = false;
								})
							},
							AddBigType() {
								this.AddBigTypeFormShow = true;
							},
							AddBigTypeCancel(){
								this.AddBigTypeFormShow = false;
								this.AddBigTypeForm={};
							},
							AddBigTypeSure() {
								axios.post("http://localhost/SweetWine/AddBigType.action", this.AddBigTypeForm)
								.then(res => {
									if (res.data == "AddOK") {
										alert("添加成功");
										this.AddBigTypeForm={};
										this.AddBigTypeFormShow = false;
										this.create(1);
										this.listPage = 1;
									}
								})
							},
							UpBigType(val) {
								this.UpBigTypeForm = JSON.parse(JSON.stringify(val));
								this.UpBigTypeFormShow = true;
							},
							UpBigTypeSure() {
								axios.post("http://localhost/SweetWine/UpBigType.action", this.UpBigTypeForm)
								.then(res => {
									if (res.data == "UpOK") {
										this.UpBigTypeFormShow = false;
										this.create(1);
										this.listPage = 1;
										alert("修改成功");
									} else {
										alert("修改失败");
									}
								})
							},
							DelBigType(val) {
								if (confirm("确定要删除这项数据吗？")) {
									axios.post("http://localhost/SweetWine/DelBigType.action?bigtypeId=" + val)
									.then(res => {
										if (res.data == "DelOK") {
											this.handleCurrentChange(1);
											alert("删除成功！");
										} else {
											alert("删除失败！");
										}
									})
								}
							}
						}
					  }
					},
					{
						path: '/countrytype',
						name: 'countrytype',
						component: {
							template: '#countrytype',
							data(){
								return {
									datas:[],
									total: 10,
									pagesize: 5,
									listPage: 1,
									flag: true,
									
									Search: {
										typeId: "",
										typeName: ""
									},
									
									AddGoodsTypeFormShow: false,
									formLabelWidth: "120px",
									
									AddGoodsTypeForm: {
										typeId: "",
										typeName: "",
										bigtypeId: ""
									},
									
									UpGoodsTypeFormShow: false,
									UpGoodsTypeForm: {
										typeId: "",
										typeName: "",
										bigtypeId: ""
									}
								}
							},
							created:function(){
								this.create(1);
							},
							methods:{
								create(pagenum){
									axios.post("http://localhost/SweetWine/getAllCountryType.action?pagenum="+ pagenum + "&pagesize="+this.pagesize)
									.then(res=>{
										this.total = res.data.total;
										this.datas=res.data.list;
									})
								},
								handleCurrentChange(val) {
									this.create(val)
								},
								SearchGoodsType() {
									axios.post("http://localhost/SweetWine/SearchCountryType.action", this.Search)
									.then(res => {
										this.datas = res.data;
										this.Search={};
										this.flag = false;
									})
									
								},
								AddGoodsType() {
									this.AddGoodsTypeFormShow = true;
								},
								AddGoodsTypeCancel(){
									this.AddGoodsTypeFormShow = false;
									this.AddGoodsTypeForm={};
								},
								AddGoodsTypeSure() {
									axios.post("http://localhost/SweetWine/AddCountryType.action", this.AddGoodsTypeForm)
									.then(res => {
										if (res.data == "AddOK") {
											alert("添加成功");
											this.AddGoodsTypeForm={};
											this.AddGoodsTypeFormShow = false;
											this.create(1);
											this.listPage = 1;
										}
									})
									console.log(this.AddGoodsTypeForm);
								},
								UpGoodsType(val) {
									this.UpGoodsTypeForm =val;
									this.UpGoodsTypeFormShow = true;
								},
								UpGoodsTypeSure() {
									axios.post("http://localhost/SweetWine/UpCountryType.action", this.UpGoodsTypeForm)
									.then(res => {
										if (res.data == "UpOK") {
											this.UpGoodsTypeFormShow = false;
											this.create(1);
											this.listPage = 1;
											alert("修改成功");
										} else {
											alert("修改失败");
										}
									})
								},
								DelGoodsType(val) {
									if (confirm("确定要删除这项数据吗？")) {
										axios.post("http://localhost/SweetWine/DelCountryType.action?typeId=" + val)
										.then(res => {
											if (res.data == "DelOK") {
												this.handleCurrentChange(1);
												alert("删除成功！");
											} else {
												alert("删除失败！");
											}
										})
									}
								},
								
							}
						}
					},
					{
					  path: '/pricetype',
					  name: 'pricetype',
					  component: {
					    template: '#pricetype',
						data(){
							return {
								datas:[],
								total: 10,
								pagesize: 5,
								listPage: 1,
								flag: true,
								
								Search: {
									typeId: "",
									typeName: ""
								},
								
								AddGoodsTypeFormShow: false,
								formLabelWidth: "120px",
								
								AddGoodsTypeForm: {
								    typeId: "",
								    typeName: "",
								    bigtypeId: ""
								},
								
								UpGoodsTypeFormShow: false,
								UpGoodsTypeForm: {
								    typeId: "",
								    typeName: "",
								    bigtypeId: ""
								}
							}
						},
						created:function(){
							this.create(1);
						},
						methods:{
							create(pagenum){
								axios.post("http://localhost/SweetWine/getAllPriceType.action?pagenum="+ pagenum + "&pagesize="+this.pagesize)
								.then(res=>{
									this.total = res.data.total;
									this.datas=res.data.list;
								})
							},
							handleCurrentChange(val) {
								this.create(val)
							},
							SearchGoodsType() {
								axios.post("http://localhost/SweetWine/SearchPriceType.action", this.Search)
								.then(res => {
									this.datas = res.data;
									this.Search={};
									this.flag = false;
								})
								
							},
							AddGoodsType() {
								this.AddGoodsTypeFormShow = true;
							},
							AddGoodsTypeCancel(){
								this.AddGoodsTypeFormShow = false;
								this.AddGoodsTypeForm={};
							},
							AddGoodsTypeSure() {
								axios.post("http://localhost/SweetWine/AddPriceType.action", this.AddGoodsTypeForm)
								.then(res => {
									if (res.data == "AddOK") {
										alert("添加成功");
										this.AddGoodsTypeForm={};
										this.AddGoodsTypeFormShow = false;
										this.create(1);
										this.listPage = 1;
									}
								})
								console.log(this.AddGoodsTypeForm);
							},
							UpGoodsType(val) {
								this.UpGoodsTypeForm =val;
								this.UpGoodsTypeFormShow = true;
							},
							UpGoodsTypeSure() {
								axios.post("http://localhost/SweetWine/UpPriceType.action", this.UpGoodsTypeForm)
								.then(res => {
									if (res.data == "UpOK") {
										this.UpGoodsTypeFormShow = false;
										this.create(1);
										this.listPage = 1;
										alert("修改成功");
									} else {
										alert("修改失败");
									}
								})
							},
							DelGoodsType(val) {
								if (confirm("确定要删除这项数据吗？")) {
									axios.post("http://localhost/SweetWine/DelPriceType.action?typeId=" + val)
									.then(res => {
										if (res.data == "DelOK") {
											this.handleCurrentChange(1);
											alert("删除成功！");
										} else {
											alert("删除失败！");
										}
									})
								}
							},
						}
					  }
					},
					{
					  path: '/recommendtype',
					  name: 'recommendtype',
					  component: {
					    template: '#recommendtype',
						data(){
							return {
								datas:[],
								total: 10,
								pagesize: 5,
								listPage: 1,
								flag: true,
								
								Search: {
								    typeId: "",
								    typeName: ""
								},
								
								AddGoodsTypeFormShow: false,
								formLabelWidth: "120px",
								
								AddGoodsTypeForm: {
								    typeId: "",
								    typeName: "",
								    bigtypeId: ""
								},
								
								UpGoodsTypeFormShow: false,
								UpGoodsTypeForm: {
								    typeId: "",
								    typeName: "",
								    bigtypeId: ""
								}
							}
						},
						created:function(){
							this.create(1);
						},
						methods:{
							create(pagenum){
								axios.post("http://localhost/SweetWine/getAllRecommendType.action?pagenum="+ pagenum + "&pagesize="+this.pagesize)
								.then(res=>{
									this.total = res.data.total;
									this.datas=res.data.list;
								})
							},
							handleCurrentChange(val) {
								this.create(val)
							},
							SearchGoodsType() {
								axios.post("http://localhost/SweetWine/SearchRecommendType.action", this.Search)
								.then(res => {
									this.datas = res.data;
									this.Search={};
									this.flag = false;
								})
								
							},
							AddGoodsType() {
								this.AddGoodsTypeFormShow = true;
							},
							AddGoodsTypeCancel(){
								this.AddGoodsTypeFormShow = false;
								this.AddGoodsTypeForm={};
							},
							AddGoodsTypeSure() {
								axios.post("http://localhost/SweetWine/AddRecommendType.action", this.AddGoodsTypeForm)
								.then(res => {
									if (res.data == "AddOK") {
										alert("添加成功");
										this.AddGoodsTypeForm={};
										this.AddGoodsTypeFormShow = false;
										this.create(1);
										this.listPage = 1;
									}
								})
								console.log(this.AddGoodsTypeForm);
							},
							UpGoodsType(val) {
								this.UpGoodsTypeForm =val;
								this.UpGoodsTypeFormShow = true;
							},
							UpGoodsTypeSure() {
								axios.post("http://localhost/SweetWine/UpRecommendType.action", this.UpGoodsTypeForm)
								.then(res => {
									if (res.data == "UpOK") {
										this.UpGoodsTypeFormShow = false;
										this.create(1);
										this.listPage = 1;
										alert("修改成功");
									} else {
										alert("修改失败");
									}
								})
							},
							DelGoodsType(val) {
								if (confirm("确定要删除这项数据吗？")) {
									axios.post("http://localhost/SweetWine/DelRecommendType.action?typeId=" + val)
									.then(res => {
										if (res.data == "DelOK") {
											this.handleCurrentChange(1);
											alert("删除成功！");
										} else {
											alert("删除失败！");
										}
									})
								}
							},
						}
					  }
					},
					{
					  path: '/tooltype',
					  name: 'tooltype',
					  component: {
					    template: '#tooltype',
						data(){
							return {
								datas:[],
								total: 10,
								pagesize: 5,
								listPage: 1,
								flag: true,
								
								Search: {
									typeId: "",
									typeName: ""
								},
								
								AddGoodsTypeFormShow: false,
								formLabelWidth: "120px",
								
								AddGoodsTypeForm: {
								    typeId: "",
								    typeName: "",
								    bigtypeId: ""
								},
								
								UpGoodsTypeFormShow: false,
								UpGoodsTypeForm: {
								    typeId: "",
								    typeName: "",
								    bigtypeId: ""
								}
							}
						},
						created:function(){
							this.create(1);
						},
						methods:{
							create(pagenum){
								axios.post("http://localhost/SweetWine/getAllToolType.action?pagenum="+ pagenum + "&pagesize="+this.pagesize)
								.then(res=>{
									this.total = res.data.total;
									this.datas=res.data.list;
								})
							},
							handleCurrentChange(val) {
								this.create(val)
							},
							SearchGoodsType() {
								axios.post("http://localhost/SweetWine/SearchToolType.action", this.Search)
								.then(res => {
									this.datas = res.data;
									this.Search={};
									this.flag = false;
								})
								
							},
							AddGoodsType() {
								this.AddGoodsTypeFormShow = true;
							},
							AddGoodsTypeCancel(){
								this.AddGoodsTypeFormShow = false;
								this.AddGoodsTypeForm={};
							},
							AddGoodsTypeSure() {
								axios.post("http://localhost/SweetWine/AddToolType.action", this.AddGoodsTypeForm)
								.then(res => {
									if (res.data == "AddOK") {
										alert("添加成功");
										this.AddGoodsTypeForm={};
										this.AddGoodsTypeFormShow = false;
										this.create(1);
										this.listPage = 1;
									}
								})
								console.log(this.AddGoodsTypeForm);
							},
							UpGoodsType(val) {
								this.UpGoodsTypeForm =val;
								this.UpGoodsTypeFormShow = true;
							},
							UpGoodsTypeSure() {
								axios.post("http://localhost/SweetWine/UpToolType.action", this.UpGoodsTypeForm)
								.then(res => {
									if (res.data == "UpOK") {
										this.UpGoodsTypeFormShow = false;
										this.create(1);
										this.listPage = 1;
										alert("修改成功");
									} else {
										alert("修改失败");
									}
								})
							},
							DelGoodsType(val) {
								if (confirm("确定要删除这项数据吗？")) {
									axios.post("http://localhost/SweetWine/DelToolType.action?typeId=" + val)
									.then(res => {
										if (res.data == "DelOK") {
											this.handleCurrentChange(1);
											alert("删除成功！");
										} else {
											alert("删除失败！");
										}
									})
								}
							},
						}
					  }
					},
					{
					  path: '/winetype',
					  name: 'winetype',
					  component: {
					    template: '#winetype',
						data(){
							return {
								datas:[],
								total: 10,
								pagesize: 5,
								listPage: 1,
								flag: true,
								
								Search: {
									typeId: "",
									typeName: ""
								},
								
								AddGoodsTypeFormShow: false,
								formLabelWidth: "120px",
								
								AddGoodsTypeForm: {
								    typeId: "",
								    typeName: "",
								    bigtypeId: ""
								},
								
								UpGoodsTypeFormShow: false,
								UpGoodsTypeForm: {
								    typeId: "",
								    typeName: "",
								    bigtypeId: ""
								}
							}
						},
						created:function(){
							this.create(1);
						},
						methods:{
							create(pagenum){
								axios.post("http://localhost/SweetWine/getAllWineType.action?pagenum="+ pagenum + "&pagesize="+this.pagesize)
								.then(res=>{
									this.total = res.data.total;
									this.datas=res.data.list;
								})
							},
							handleCurrentChange(val) {
								this.create(val)
							},
							SearchGoodsType() {
								axios.post("http://localhost/SweetWine/SearchWineType.action", this.Search)
								.then(res => {
									this.datas = res.data;
									this.Search={};
									this.flag = false;
								})
								
							},
							AddGoodsType() {
								this.AddGoodsTypeFormShow = true;
							},
							AddGoodsTypeCancel(){
								this.AddGoodsTypeFormShow = false;
								this.AddGoodsTypeForm={};
							},
							AddGoodsTypeSure() {
								axios.post("http://localhost/SweetWine/AddWineType.action", this.AddGoodsTypeForm)
								.then(res => {
									if (res.data == "AddOK") {
										alert("添加成功");
										this.AddGoodsTypeForm={};
										this.AddGoodsTypeFormShow = false;
										this.create(1);
										this.listPage = 1;
									}
								})
								console.log(this.AddGoodsTypeForm);
							},
							UpGoodsType(val) {
								this.UpGoodsTypeForm =val;
								this.UpGoodsTypeFormShow = true;
							},
							UpGoodsTypeSure() {
								axios.post("http://localhost/SweetWine/UpWineType.action", this.UpGoodsTypeForm)
								.then(res => {
									if (res.data == "UpOK") {
										this.UpGoodsTypeFormShow = false;
										this.create(1);
										this.listPage = 1;
										alert("修改成功");
									} else {
										alert("修改失败");
									}
								})
							},
							DelGoodsType(val) {
								if (confirm("确定要删除这项数据吗？")) {
									axios.post("http://localhost/SweetWine/DelWineType.action?typeId=" + val)
									.then(res => {
										if (res.data == "DelOK") {
											this.handleCurrentChange(1);
											alert("删除成功！");
										} else {
											alert("删除失败！");
										}
									})
								}
							},
						}
					  }
					},
								 
			      ]
			})
			
			var v=new Vue({
				el:"#app",
				data:{
					adminName:""
				},
				router,
				created: function() {
					this.$router.push("/goods");
					this.adminName = JSON.parse(sessionStorage.getItem("item")).adminName;
				},
				methods:{
					AdminInfo(){
						this.$router.push("/admin");
					},
					Exit(){
						sessionStorage.clear();
						location.href = "Login.html";
					},
					
					Goods(){
						this.$router.push("/goods");
					},
					Pics(){
						this.$router.push("/pics");
					},
					GoodsDetail(){
						this.$router.push("/goodsdetail");
					},
					
					Swiper(){
						this.$router.push("/swiper");
					},
					Orders(){
						this.$router.push("/orders");
					},
					Address(){
						this.$router.push("/address");
					},
					User(){
						this.$router.push("/user");
					},
					Admin(){
						this.$router.push("/admin");
					},
					
					
					BigType(){
						  this.$router.push("/bigtype");
					},
					CountryType(){
						  this.$router.push("/countrytype");
					},
					PriceType(){
						  this.$router.push("/pricetype");
					},
					RecommendType(){
						  this.$router.push("/recommendtype");
					},
					ToolType(){
						  this.$router.push("/tooltype");
					},
					WineType(){
						  this.$router.push("/winetype");
					}
				}
			})
		</script>
		
	</body>
</html>

<!-- 
	33 ~ 72 左侧导航栏
	75 ~ 89 系统页头
	
	以下是路由：
		103 ~ 237 商品管理
		240 ~ 317 商品细节
		320 ~ 397 商品详情
		
		401 ~ 497 首页轮播图管理
		501 ~ 598 订单管理
		602 ~ 661 地址管理
		665 ~ 741 用户管理
		743 ~ 828 设置管理员
		
		832 ~ 906 商品类型
		908 ~ 989 国家
		991 ~ 1072 价格
		1074 ~ 1155 推荐
		1158 ~ 1239 工具
		1241 ~ 1322 酒
		
	以下是路由表：
		1330 ~ 1492 商品管理
		1494 ~ 1603 商品细节
		1605 ~ 1715 商品详情
		
		1717 ~ 1827 首页轮播图管理
		1829 ~ 1933 订单管理
		1935 ~ 1981 地址管理
		1983 ~ 2059 管理用户信息
		2061 ~ 2274 设置管理员
		
		2279 ~ 2385 商品类型
		2386 ~ 2497 国家
		2498 ~ 2068 价格
		2069 ~ 2179 推荐
		2180 ~ 2830 工具
		2831 ~ 2941 酒	
	
 -->
